To: luther@skyinet.net
Cc: linux-m68k@lists.linux-m68k.org
Subject: Re: L68K: two sda deisks ???
References: <m0y8Shu-00023kC@iliana>
X-Yow: This is a NO-FRILLS flight -- hold th' CANADIAN BACON!!
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: 27 Feb 1998 10:31:18 +0100
In-Reply-To: luther@skyinet.net's message of Sat, 28 Feb 1998 00:32:18 +0800 (PHT)
Sender: owner-linux-m68k@phil.uni-sb.de

luther  <luther@skyinet.net> writes:

|> Hello, ...

|> i just connected a Syjet 1.5GB removable harddisk to my amiga. it went
|> fine under amigados, but when i launched linux, both my SCSI harddisk and
|> the Syjet where recognized as sda

No, they aren't.  It's just a matter of getting the message right, the
kernel identifies the devices correctly.  Here is a patch:


--- linux-2.1.85/drivers/scsi/sd.c.~1~	Wed Jan 14 21:40:28 1998
+++ linux-2.1.85/drivers/scsi/sd.c	Thu Jan 29 10:16:01 1998
@@ -91,7 +91,7 @@
 {
     if( disknum <= 26 )
     {
-        sprintf(buffer, "sd%c", 'a' + (disknum >> 4));
+        sprintf(buffer, "sd%c", 'a' + disknum);
     }
     else
     {
@@ -101,8 +101,8 @@
          * For larger numbers of disks, we need to go to a new
          * naming scheme.
          */
-        min1 = (disknum >> 4) / 26;
-        min2 = (disknum >> 4) % 26;
+        min1 = disknum / 26;
+        min2 = disknum % 26;
         sprintf(buffer, "sd%c%c", 'a' + min1, 'a' + min2);
     }
 }
@@ -677,7 +677,7 @@
 	goto repeat;
     }
 
-    sd_devname(devm, nbuff);
+    sd_devname(devm >> 4, nbuff);
     SCSI_LOG_HLQUEUE(2,printk("%s : real dev = /dev/%d, block = %d\n",
 	   nbuff, dev, block));
 

Andreas.
