Re: [lkml]Re: ac10 ide-cd oopses on boot

2001-04-20 Thread thunder7

On Thu, Apr 19, 2001 at 09:55:46PM -0500, Jordan wrote:
> Bill Nottingham wrote:
> > 
> > J . A . Magallon ([EMAIL PROTECTED]) said:
> > > > Can you back out the ide-cd changes Jens did and see if that fixes it ?
> > >
> > > Reverted the changes in ide-cd.[hc], and same result.
> > 
> > You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
> > out the parts of the patch new there to ac10, and it worked again
> > for me...
> > 
> That worked here as well...here is a patch that should restore
> linux/drivers/cdrom/cdrom.c back to its working ac9 state from ac10.
> 


2.4.3-ac10 wouldn't boot for me without this patch.
I have only scsi cdrom(s) on an symbios 860:

Attached devices: 
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: PLEXTOR  Model: CD-R   PX-R412C  Rev: 1.03
  Type:   CD-ROM   ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 04 Lun: 00
  Vendor: SONY Model: SDT-5000 Rev: 330B
  Type:   Sequential-AccessANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: PLEXTOR  Model: CD-ROM PX-32TS   Rev: 1.02
  Type:   CD-ROM   ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: TOSHIBA  Model: DVD-ROM SD-M1401 Rev: 1008
  Type:   CD-ROM   ANSI SCSI revision: 02

With this patch, it boots just fine.

Good luck,
Jurriaan
-- 
And all the while, all the while, I still hear that call
To the land of gold and poison that beckons to us all
Do you think you're so brave just to go running to that which beckons to us all?
New Model Army - Valleys of Green and Grey
GNU/Linux 2.4.3-ac10 SMP/ReiserFS 2x1743 bogomips load av: 0.20 0.05 0.01
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



patch: cdrom_init not called correctly (was Re: ac10 ide-cd oopses on boot)

2001-04-20 Thread Jens Axboe

On Fri, Apr 20 2001, Stefan Jaschke wrote:
> On Friday 20 April 2001 00:49, J . A . Magallon wrote:
> > Hi,
> >
> > Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> > the CD and gives the oops.
> > >>EIP; c01bfc7c<=
> 
> This appears to be a known problem. Jens Axboe sent a patch in a different
> thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
> here for your convenience. (The patch is against 2.4.4-pre4 + Jens' 
> latest fixes.) 

Indeed, and it was the missing init call as suspected. The problem is
that cdrom is consequently linked after low level drivers -- this is
really the stuff that should be fixed, but instead of rewriting all of
that this quick hack should suffice.

-- 
Jens Axboe



--- drivers/cdrom/cdrom.c~  Fri Apr 20 10:43:31 2001
+++ drivers/cdrom/cdrom.c   Fri Apr 20 10:44:21 2001
@@ -381,7 +381,7 @@
  * change it here without gcc complaining at every line.
  */
 #define ENSURE(call, bits) if (cdo->call == NULL) *change_capability &= ~(bits)
-
+static int cdrom_init(void);
 int register_cdrom(struct cdrom_device_info *cdi)
 {
static char banner_printed;
@@ -397,11 +397,9 @@
if (cdo->open == NULL || cdo->release == NULL)
return -2;
if ( !banner_printed ) {
-   printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
banner_printed = 1;
-#ifdef CONFIG_SYSCTL
-   cdrom_sysctl_register();
-#endif /* CONFIG_SYSCTL */ 
+   printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
+   cdrom_init();
}
ENSURE(drive_status, CDC_DRIVE_STATUS );
ENSURE(media_changed, CDC_MEDIA_CHANGED);
@@ -477,7 +475,6 @@
 {
struct cdrom_device_info *cdi, *prev;
int major = MAJOR(unreg->dev);
-   int bit_nr, cd_index;
 
cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 
 
@@ -2706,7 +2703,7 @@
 
 #endif /* CONFIG_SYSCTL */
 
-static int __init cdrom_init(void)
+static int cdrom_init(void)
 {
int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
 
@@ -2729,5 +2726,4 @@
devfs_unregister(devfs_handle);
 }
 
-module_init(cdrom_init);
 module_exit(cdrom_exit);



Re: ac10 ide-cd oopses on boot

2001-04-20 Thread Stefan Jaschke

On Friday 20 April 2001 00:49, J . A . Magallon wrote:
> Hi,
>
> Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> the CD and gives the oops.
> >>EIP; c01bfc7c<=

This appears to be a known problem. Jens Axboe sent a patch in a different
thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
here for your convenience. (The patch is against 2.4.4-pre4 + Jens' 
latest fixes.) 

Stefan



--- drivers/cdrom/cdrom.c~  Thu Apr 19 13:44:46 2001
+++ drivers/cdrom/cdrom.c   Thu Apr 19 13:45:33 2001
@@ -350,6 +350,12 @@
 {
int i, nr, foo;
 
+   if (!cdrom_numbers) {
+   int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
+   cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
+   memset(cdrom_numbers, 0, n_entries * sizeof(unsigned long));
+   }
+
nr = 0;
foo = -1;
for (i = 0; i < CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
@@ -2696,10 +2702,6 @@
 
 static int __init cdrom_init(void)
 {
-   int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
-
-   cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
-
 #ifdef CONFIG_SYSCTL
cdrom_sysctl_register();
 #endif



Re: ac10 ide-cd oopses on boot

2001-04-20 Thread Stefan Jaschke

On Friday 20 April 2001 00:49, J . A . Magallon wrote:
 Hi,

 Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
 the CD and gives the oops.
 EIP; c01bfc7c cdrom_get_entry+1c/50   =

This appears to be a known problem. Jens Axboe sent a patch in a different
thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
here for your convenience. (The patch is against 2.4.4-pre4 + Jens' 
latest fixes.) 

Stefan



--- drivers/cdrom/cdrom.c~  Thu Apr 19 13:44:46 2001
+++ drivers/cdrom/cdrom.c   Thu Apr 19 13:45:33 2001
@@ -350,6 +350,12 @@
 {
int i, nr, foo;
 
+   if (!cdrom_numbers) {
+   int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
+   cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
+   memset(cdrom_numbers, 0, n_entries * sizeof(unsigned long));
+   }
+
nr = 0;
foo = -1;
for (i = 0; i  CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
@@ -2696,10 +2702,6 @@
 
 static int __init cdrom_init(void)
 {
-   int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
-
-   cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
-
 #ifdef CONFIG_SYSCTL
cdrom_sysctl_register();
 #endif



patch: cdrom_init not called correctly (was Re: ac10 ide-cd oopses on boot)

2001-04-20 Thread Jens Axboe

On Fri, Apr 20 2001, Stefan Jaschke wrote:
 On Friday 20 April 2001 00:49, J . A . Magallon wrote:
  Hi,
 
  Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
  the CD and gives the oops.
  EIP; c01bfc7c cdrom_get_entry+1c/50   =
 
 This appears to be a known problem. Jens Axboe sent a patch in a different
 thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
 here for your convenience. (The patch is against 2.4.4-pre4 + Jens' 
 latest fixes.) 

Indeed, and it was the missing init call as suspected. The problem is
that cdrom is consequently linked after low level drivers -- this is
really the stuff that should be fixed, but instead of rewriting all of
that this quick hack should suffice.

-- 
Jens Axboe



--- drivers/cdrom/cdrom.c~  Fri Apr 20 10:43:31 2001
+++ drivers/cdrom/cdrom.c   Fri Apr 20 10:44:21 2001
@@ -381,7 +381,7 @@
  * change it here without gcc complaining at every line.
  */
 #define ENSURE(call, bits) if (cdo-call == NULL) *change_capability = ~(bits)
-
+static int cdrom_init(void);
 int register_cdrom(struct cdrom_device_info *cdi)
 {
static char banner_printed;
@@ -397,11 +397,9 @@
if (cdo-open == NULL || cdo-release == NULL)
return -2;
if ( !banner_printed ) {
-   printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
banner_printed = 1;
-#ifdef CONFIG_SYSCTL
-   cdrom_sysctl_register();
-#endif /* CONFIG_SYSCTL */ 
+   printk(KERN_INFO "Uniform CD-ROM driver " REVISION "\n");
+   cdrom_init();
}
ENSURE(drive_status, CDC_DRIVE_STATUS );
ENSURE(media_changed, CDC_MEDIA_CHANGED);
@@ -477,7 +475,6 @@
 {
struct cdrom_device_info *cdi, *prev;
int major = MAJOR(unreg-dev);
-   int bit_nr, cd_index;
 
cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 
 
@@ -2706,7 +2703,7 @@
 
 #endif /* CONFIG_SYSCTL */
 
-static int __init cdrom_init(void)
+static int cdrom_init(void)
 {
int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
 
@@ -2729,5 +2726,4 @@
devfs_unregister(devfs_handle);
 }
 
-module_init(cdrom_init);
 module_exit(cdrom_exit);



Re: [lkml]Re: ac10 ide-cd oopses on boot

2001-04-20 Thread thunder7

On Thu, Apr 19, 2001 at 09:55:46PM -0500, Jordan wrote:
 Bill Nottingham wrote:
  
  J . A . Magallon ([EMAIL PROTECTED]) said:
Can you back out the ide-cd changes Jens did and see if that fixes it ?
  
   Reverted the changes in ide-cd.[hc], and same result.
  
  You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
  out the parts of the patch new there to ac10, and it worked again
  for me...
  
 That worked here as well...here is a patch that should restore
 linux/drivers/cdrom/cdrom.c back to its working ac9 state from ac10.
 
snip patch; can be found on lkml

2.4.3-ac10 wouldn't boot for me without this patch.
I have only scsi cdrom(s) on an symbios 860:

Attached devices: 
Host: scsi0 Channel: 00 Id: 02 Lun: 00
  Vendor: PLEXTOR  Model: CD-R   PX-R412C  Rev: 1.03
  Type:   CD-ROM   ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 04 Lun: 00
  Vendor: SONY Model: SDT-5000 Rev: 330B
  Type:   Sequential-AccessANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
  Vendor: PLEXTOR  Model: CD-ROM PX-32TS   Rev: 1.02
  Type:   CD-ROM   ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
  Vendor: TOSHIBA  Model: DVD-ROM SD-M1401 Rev: 1008
  Type:   CD-ROM   ANSI SCSI revision: 02

With this patch, it boots just fine.

Good luck,
Jurriaan
-- 
And all the while, all the while, I still hear that call
To the land of gold and poison that beckons to us all
Do you think you're so brave just to go running to that which beckons to us all?
New Model Army - Valleys of Green and Grey
GNU/Linux 2.4.3-ac10 SMP/ReiserFS 2x1743 bogomips load av: 0.20 0.05 0.01
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Jordan

Bill Nottingham wrote:
> 
> J . A . Magallon ([EMAIL PROTECTED]) said:
> > > Can you back out the ide-cd changes Jens did and see if that fixes it ?
> >
> > Reverted the changes in ide-cd.[hc], and same result.
> 
> You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
> out the parts of the patch new there to ac10, and it worked again
> for me...
> 
> Bill
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

That worked here as well...here is a patch that should restore
linux/drivers/cdrom/cdrom.c back to its working ac9 state from ac10.

Jordan

--- linux_corrupt_cdrom/drivers/cdrom/cdrom.c   Thu Apr 19 19:31:00 2001
+++ linux/drivers/cdrom/cdrom.c Wed Apr 18 01:49:05 2001
@@ -279,9 +279,6 @@
 static int lockdoor = 1;
 /* will we ever get to use this... sigh. */
 static int check_media_type;
-static unsigned long *cdrom_numbers;
-static DECLARE_MUTEX(cdrom_sem);
-
 MODULE_PARM(debug, "i");
 MODULE_PARM(autoclose, "i");
 MODULE_PARM(autoeject, "i");
@@ -343,38 +340,6 @@
check_media_change: cdrom_media_changed,
 };
 
-/*
- * get or clear a new cdrom number, run under cdrom_sem
- */
-static int cdrom_get_entry(void)
-{
-   int i, nr, foo;
-
-   nr = 0;
-   foo = -1;
-   for (i = 0; i < CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
-   if (cdrom_numbers[i] == ~0UL) {
-   nr += sizeof(unsigned long) * 8;
-   continue;
-   }
-   foo = ffz(cdrom_numbers[i]);
-   set_bit(foo, _numbers[i]);
-   nr += foo;
-   break;
-   }
-
-   return foo == -1 ? foo : nr;
-}
-
-static void cdrom_clear_entry(struct cdrom_device_info *cdi)
-{
-   int bit_nr = cdi->nr & ~(sizeof(unsigned long) * 8);
-   int cd_index = cdi->nr / (sizeof(unsigned long) * 8);
-
-   clear_bit(bit_nr, _numbers[cd_index]);
-}
-
-
 /* This macro makes sure we don't have to check on cdrom_device_ops
  * existence in the run-time routines below. Change_capability is a
  * hack to have the capability flags defined const, while we can still
@@ -389,6 +354,7 @@
 struct cdrom_device_ops *cdo = cdi->ops;
 int *change_capability = (int *)>capability; /* hack */
char vname[16];
+   static unsigned int cdrom_counter;
 
cdinfo(CD_OPEN, "entering register_cdrom\n"); 
 
@@ -429,17 +395,7 @@
 
if (!devfs_handle)
devfs_handle = devfs_mk_dir (NULL, "cdroms", NULL);
-
-   /*
-* get new cdrom number
-*/
-   down(_sem);
-   cdi->nr = cdrom_get_entry();
-   up(_sem);
-   if (cdi->nr == -1)
-   return -ENOMEM;
-
-   sprintf(vname, "cdrom%u", cdi->nr);
+   sprintf (vname, "cdrom%u", cdrom_counter++);
if (cdi->de) {
int pos;
devfs_handle_t slave;
@@ -462,13 +418,9 @@
S_IFBLK | S_IRUGO | S_IWUGO,
_fops, NULL);
}
-
-   down(_sem);
+   cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
cdi->next = topCdromPtr;
topCdromPtr = cdi;
-   up(_sem);
-
-   cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
return 0;
 }
 #undef ENSURE
@@ -477,14 +429,12 @@
 {
struct cdrom_device_info *cdi, *prev;
int major = MAJOR(unreg->dev);
-   int bit_nr, cd_index;
 
cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 
 
if (major < 0 || major >= MAX_BLKDEV)
return -1;
 
-   down(_sem);
prev = NULL;
cdi = topCdromPtr;
while (cdi != NULL && cdi->dev != unreg->dev) {
@@ -492,20 +442,14 @@
cdi = cdi->next;
}
 
-   if (cdi == NULL) {
-   up(_sem);
+   if (cdi == NULL)
return -2;
-   }
-
-   cdrom_clear_entry(cdi);
-
if (prev)
prev->next = cdi->next;
else
topCdromPtr = cdi->next;
-   up(_sem);
cdi->ops->n_minors--;
-   devfs_unregister(cdi->de);
+   devfs_unregister (cdi->de);
cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi->name);
return 0;
 }
@@ -514,14 +458,10 @@
 {
struct cdrom_device_info *cdi;
 
-   down(_sem);
-
cdi = topCdromPtr;
while (cdi != NULL && cdi->dev != dev)
cdi = cdi->next;
 
-   up(_sem);
-
return cdi;
 }
 
@@ -2489,8 +2429,6 @@
}
 
pos = sprintf(info, "CD-ROM information, " VERSION "\n");
-
-   down(_sem);

pos += sprintf(info+pos, "\ndrive name:\t");
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)
@@ -2560,8 +2498,6 @@
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi->next)

Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Bill Nottingham

J . A . Magallon ([EMAIL PROTECTED]) said: 
> > Can you back out the ide-cd changes Jens did and see if that fixes it ?
> 
> Reverted the changes in ide-cd.[hc], and same result.

You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
out the parts of the patch new there to ac10, and it worked again
for me...

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon


On 04.20 Udo A. Steinberg wrote:
> Alan Cox wrote:
> > 
> > > Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> > > the CD and gives the oops.
> 
> I'm getting a similar oops with -ac10. I initially thought this might be
> a result of switching to gcc-2.95.3, because -ac9 runs fine when built
> with gcc-2.95.2, but if others have seen this too, it's probably the
> cdrom code indeed.
> 

Mine is built with gcc-2.96-0.48mdk.

--
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Udo A. Steinberg

Alan Cox wrote:
> 
> > Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> > the CD and gives the oops.

I'm getting a similar oops with -ac10. I initially thought this might be
a result of switching to gcc-2.95.3, because -ac9 runs fine when built
with gcc-2.95.2, but if others have seen this too, it's probably the
cdrom code indeed.

> Can you back out the ide-cd changes Jens did and see if that fixes it ?

I'll try that tomorrow, too.

Regards,
Udo.

--

ksymoops 2.3.7 on i686 2.4.3-ac9.  Options used
 -v /usr/src/linux/vmlinux (specified)
 -K (specified)
 -l /proc/modules (default)
 -o /lib/modules/2.4.3-ac10 (specified)
 -m /boot/System.map-2.4.3-ac10 (specified)

No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel NULL pointer dereference at virtual address 
Oops: 
CPU: 0
EIP: 0010:[]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 000d  ebx:   ecx:   edx: 
esi:   edi: c1469ae8  ebp: 0021  ebp: cffe5ee0
ds: 0018  es: 0018  ss: 0018
Process swapper (pid: 1, stackpage=cffe5000)
Stack: c0276018 c0275fb4 c01b9dbf c1469a00 c02e31f4 c1469b18 c02e3100 0001
   0286 0001 0001 c0113623 c02b5fe1 0246 c0113574 c0244e02
   c0244e9d c1469a00 c02e3100 c01b91cb c02448ec c02e3100 c1469037 c0244fc0
Call Trace: [] [] [] [] []
[] [] [] []
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00
 
>>EIP; c01b9bac<=
Trace; c01b9dbf 
Trace; c0113623 
Trace; c0113574 
Trace; c01b91cb 
Trace; c01b8d0c 
Trace; c01b976a 
Trace; c01b9af1 
Trace; c0105007 
Trace; c0105488 
Code;  c01b9bac 
 <_EIP>:
Code;  c01b9bac<=
   0:   8b 04 8a  movl   (%edx,%ecx,4),%eax   <=
Code;  c01b9baf 
   3:   83 f8 ff  cmpl   $0x,%eax
Code;  c01b9bb2 
   6:   75 0c jne14 <_EIP+0x14> c01b9bc0 

Code;  c01b9bb4 
   8:   83 c6 20  addl   $0x20,%esi
Code;  c01b9bb7 
   b:   eb e7 jmpfff4 <_EIP+0xfff4> c01b9ba0 

Code;  c01b9bb9 
   d:   8d b4 26 00 00 00 00  leal   0x0(%esi,1),%esi
 
<0>Kernel panic: Attempted to kill init!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon


On 04.20 Alan Cox wrote:
> > Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> > the CD and gives the oops.
> 
> Can you back out the ide-cd changes Jens did and see if that fixes it ?
> 
>

Reverted the changes in ide-cd.[hc], and same result.

Bootlog from ac9:

Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 39
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: IOMEGA ZIP 250 ATAPI, ATAPI FLOPPY drive
hdc: CREATIVE CD5230E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 52X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
 here, ac10 oopses >>
hda: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm
ide-floppy: hda: I/O error, pc = 5a, key =  5, asc = 24, ascq =  0

-- 
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon

Hi, 

Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
the CD and gives the oops.

Here follows the oops both raw and decoded:

Unable to handle kernel NULL pointer dereference at virtual address 
 printing eip:
c01bfc7c
pgd entry c0101000: 
pmd entry c0101000: 
.. pmd not present!
Oops: 
CPU:1
EIP:0010:[]
EFLAGS: 00010297
eax: 000d   ebx:    ecx:    eax: 
esi:    edi: c15d84e8   ebp: c019e790   esp: c15f9ee8
ds: 0018   es: 0018   ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc  c01bfeac 0001 c0239e04 c0289841 0246 0001
   c02cdfb0 c0118af8 c02cdfb0 c0220524 0080 c019f356 c021ff4c 0001
   00701600  0007122a 03297371 ff00c023 8000 c15d84e8
c02cdfb0
Call Trace: [] [] [] []
[] [] []
[] [] [] []
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00
 <0>Kernel panic: Attempted to kill init

ksymoops 2.4.1 on i686 2.4.3-ac9.  Options used
 -v /usr/src/linux-2.4.3-ac10/vmlinux (specified)
 -K (specified)
 -L (specified)
 -o /lib/modules/2.4.3-ac9/ (default)
 -m /boot/System.map-2.4.3-ac10 (specified)

No modules in ksyms, skipping objects
Unable to handle kernel NULL pointer dereference at virtual address 
c01bfc7c
Oops: 
CPU:1
EIP:0010:[]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 000d   ebx:    ecx:    eax: 
esi:    edi: c15d84e8   ebp: c019e790   esp: c15f9ee8
ds: 0018   es: 0018   ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc  c01bfeac 0001 c0239e04 c0289841 0246 0001
   c02cdfb0 c0118af8 c02cdfb0 c0220524 0080 c019f356 c021ff4c 0001
   00701600  0007122a 03297371 ff00c023 8000 c15d84e8
c02cdfb0
Call Trace: [] [] [] []
[] [] []
 [] [] [] []
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00

>>EIP; c01bfc7c<=
Trace; c01bfeac 
Trace; c0118af8 
Trace; c019f356 
Trace; ff00c023 
Trace; c019f903 
Trace; c019fc66 
Trace; c0105000 
Trace; c0105028 
Trace; c0105000 
Trace; c0105516 
Trace; c0105000 
Code;  c01bfc7c 
 <_EIP>:
Code;  c01bfc7c<=
   0:   8b 04 8a  mov(%edx,%ecx,4),%eax   <=
Code;  c01bfc7f 
   3:   83 f8 ff  cmp$0x,%eax
Code;  c01bfc82 
   6:   75 0c jne14 <_EIP+0x14> c01bfc90

Code;  c01bfc84 
   8:   83 c6 20  add$0x20,%esi
Code;  c01bfc87 
   b:   eb e7 jmpfff4 <_EIP+0xfff4> c01bfc70

Code;  c01bfc89 
   d:   8d b4 26 00 00 00 00  lea0x0(%esi,1),%esi

 <0>Kernel panic: Attempted to kill init


-- 
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon

Hi, 

Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
the CD and gives the oops.

Here follows the oops both raw and decoded:

Unable to handle kernel NULL pointer dereference at virtual address 
 printing eip:
c01bfc7c
pgd entry c0101000: 
pmd entry c0101000: 
.. pmd not present!
Oops: 
CPU:1
EIP:0010:[c01bfc7c]
EFLAGS: 00010297
eax: 000d   ebx:    ecx:    eax: 
esi:    edi: c15d84e8   ebp: c019e790   esp: c15f9ee8
ds: 0018   es: 0018   ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc  c01bfeac 0001 c0239e04 c0289841 0246 0001
   c02cdfb0 c0118af8 c02cdfb0 c0220524 0080 c019f356 c021ff4c 0001
   00701600  0007122a 03297371 ff00c023 8000 c15d84e8
c02cdfb0
Call Trace: [c01bfeac] [c0118af8] [c019f356] [ff00c023]
[c019f903] [c019fc66] [c0105000]
[c0105028] [c0105000] [c0105516] [c0105000]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00
 0Kernel panic: Attempted to kill init

ksymoops 2.4.1 on i686 2.4.3-ac9.  Options used
 -v /usr/src/linux-2.4.3-ac10/vmlinux (specified)
 -K (specified)
 -L (specified)
 -o /lib/modules/2.4.3-ac9/ (default)
 -m /boot/System.map-2.4.3-ac10 (specified)

No modules in ksyms, skipping objects
Unable to handle kernel NULL pointer dereference at virtual address 
c01bfc7c
Oops: 
CPU:1
EIP:0010:[c01bfc7c]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 000d   ebx:    ecx:    eax: 
esi:    edi: c15d84e8   ebp: c019e790   esp: c15f9ee8
ds: 0018   es: 0018   ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc  c01bfeac 0001 c0239e04 c0289841 0246 0001
   c02cdfb0 c0118af8 c02cdfb0 c0220524 0080 c019f356 c021ff4c 0001
   00701600  0007122a 03297371 ff00c023 8000 c15d84e8
c02cdfb0
Call Trace: [c01bfeac] [c0118af8] [c019f356] [ff00c023]
[c019f903] [c019fc66] [c0105000]
 [c0105028] [c0105000] [c0105516] [c0105000]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00

EIP; c01bfc7c cdrom_get_entry+1c/50   =
Trace; c01bfeac register_cdrom+1dc/280
Trace; c0118af8 printk+148/160
Trace; c019f356 ide_cdrom_probe_capabilities+3b6/3d0
Trace; ff00c023 END_OF_CODE+3ed31eb3/
Trace; c019f903 ide_cdrom_setup+4a3/4e0
Trace; c019fc66 ide_cdrom_init+e6/180
Trace; c0105000 init+0/170
Trace; c0105028 init+28/170
Trace; c0105000 init+0/170
Trace; c0105516 kernel_thread+26/30
Trace; c0105000 init+0/170
Code;  c01bfc7c cdrom_get_entry+1c/50
 _EIP:
Code;  c01bfc7c cdrom_get_entry+1c/50   =
   0:   8b 04 8a  mov(%edx,%ecx,4),%eax   =
Code;  c01bfc7f cdrom_get_entry+1f/50
   3:   83 f8 ff  cmp$0x,%eax
Code;  c01bfc82 cdrom_get_entry+22/50
   6:   75 0c jne14 _EIP+0x14 c01bfc90
cdrom_get_entry+30/50
Code;  c01bfc84 cdrom_get_entry+24/50
   8:   83 c6 20  add$0x20,%esi
Code;  c01bfc87 cdrom_get_entry+27/50
   b:   eb e7 jmpfff4 _EIP+0xfff4 c01bfc70
cdrom_get_entry+10/50
Code;  c01bfc89 cdrom_get_entry+29/50
   d:   8d b4 26 00 00 00 00  lea0x0(%esi,1),%esi

 0Kernel panic: Attempted to kill init


-- 
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon


On 04.20 Alan Cox wrote:
  Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
  the CD and gives the oops.
 
 Can you back out the ide-cd changes Jens did and see if that fixes it ?
 


Reverted the changes in ide-cd.[hc], and same result.

Bootlog from ac9:

Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 39
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: IOMEGA ZIP 250 ATAPI, ATAPI FLOPPY drive
hdc: CREATIVE CD5230E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 52X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
 here, ac10 oopses 
hda: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm
ide-floppy: hda: I/O error, pc = 5a, key =  5, asc = 24, ascq =  0

-- 
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Udo A. Steinberg

Alan Cox wrote:
 
  Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
  the CD and gives the oops.

I'm getting a similar oops with -ac10. I initially thought this might be
a result of switching to gcc-2.95.3, because -ac9 runs fine when built
with gcc-2.95.2, but if others have seen this too, it's probably the
cdrom code indeed.

 Can you back out the ide-cd changes Jens did and see if that fixes it ?

I'll try that tomorrow, too.

Regards,
Udo.

--

ksymoops 2.3.7 on i686 2.4.3-ac9.  Options used
 -v /usr/src/linux/vmlinux (specified)
 -K (specified)
 -l /proc/modules (default)
 -o /lib/modules/2.4.3-ac10 (specified)
 -m /boot/System.map-2.4.3-ac10 (specified)

No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel NULL pointer dereference at virtual address 
Oops: 
CPU: 0
EIP: 0010:[c01b9bac]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 000d  ebx:   ecx:   edx: 
esi:   edi: c1469ae8  ebp: 0021  ebp: cffe5ee0
ds: 0018  es: 0018  ss: 0018
Process swapper (pid: 1, stackpage=cffe5000)
Stack: c0276018 c0275fb4 c01b9dbf c1469a00 c02e31f4 c1469b18 c02e3100 0001
   0286 0001 0001 c0113623 c02b5fe1 0246 c0113574 c0244e02
   c0244e9d c1469a00 c02e3100 c01b91cb c02448ec c02e3100 c1469037 c0244fc0
Call Trace: [c01b9dbf] [c0113623] [c0113574] [c01b91cb] [c01b8d0c]
[c01b976a] [c01b9af1] [c0105007] [c0105488]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00
 
EIP; c01b9bac cdrom_get_entry+1c/50   =
Trace; c01b9dbf register_cdrom+1bf/250
Trace; c0113623 release_console_sem+73/80
Trace; c0113574 printk+124/130
Trace; c01b91cb ide_cdrom_probe_capabilities+3eb/400
Trace; c01b8d0c ide_cdrom_register+13c/150
Trace; c01b976a ide_cdrom_setup+49a/4e0
Trace; c01b9af1 ide_cdrom_init+e1/180
Trace; c0105007 init+7/110
Trace; c0105488 kernel_thread+28/40
Code;  c01b9bac cdrom_get_entry+1c/50
 _EIP:
Code;  c01b9bac cdrom_get_entry+1c/50   =
   0:   8b 04 8a  movl   (%edx,%ecx,4),%eax   =
Code;  c01b9baf cdrom_get_entry+1f/50
   3:   83 f8 ff  cmpl   $0x,%eax
Code;  c01b9bb2 cdrom_get_entry+22/50
   6:   75 0c jne14 _EIP+0x14 c01b9bc0 
cdrom_get_entry+30/50
Code;  c01b9bb4 cdrom_get_entry+24/50
   8:   83 c6 20  addl   $0x20,%esi
Code;  c01b9bb7 cdrom_get_entry+27/50
   b:   eb e7 jmpfff4 _EIP+0xfff4 c01b9ba0 
cdrom_get_entry+10/50
Code;  c01b9bb9 cdrom_get_entry+29/50
   d:   8d b4 26 00 00 00 00  leal   0x0(%esi,1),%esi
 
0Kernel panic: Attempted to kill init!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread J . A . Magallon


On 04.20 Udo A. Steinberg wrote:
 Alan Cox wrote:
  
   Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
   the CD and gives the oops.
 
 I'm getting a similar oops with -ac10. I initially thought this might be
 a result of switching to gcc-2.95.3, because -ac9 runs fine when built
 with gcc-2.95.2, but if others have seen this too, it's probably the
 cdrom code indeed.
 

Mine is built with gcc-2.96-0.48mdk.

--
J.A. Magallon  #  Let the source
mailto:[EMAIL PROTECTED]  #  be with you, Luke... 

Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Bill Nottingham

J . A . Magallon ([EMAIL PROTECTED]) said: 
  Can you back out the ide-cd changes Jens did and see if that fixes it ?
 
 Reverted the changes in ide-cd.[hc], and same result.

You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
out the parts of the patch new there to ac10, and it worked again
for me...

Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: ac10 ide-cd oopses on boot

2001-04-19 Thread Jordan

Bill Nottingham wrote:
 
 J . A . Magallon ([EMAIL PROTECTED]) said:
   Can you back out the ide-cd changes Jens did and see if that fixes it ?
 
  Reverted the changes in ide-cd.[hc], and same result.
 
 You want to back out the stuff from drivers/cdrom/cdrom.c; I backed
 out the parts of the patch new there to ac10, and it worked again
 for me...
 
 Bill
 -
 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
 the body of a message to [EMAIL PROTECTED]
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/

That worked here as well...here is a patch that should restore
linux/drivers/cdrom/cdrom.c back to its working ac9 state from ac10.

Jordan

--- linux_corrupt_cdrom/drivers/cdrom/cdrom.c   Thu Apr 19 19:31:00 2001
+++ linux/drivers/cdrom/cdrom.c Wed Apr 18 01:49:05 2001
@@ -279,9 +279,6 @@
 static int lockdoor = 1;
 /* will we ever get to use this... sigh. */
 static int check_media_type;
-static unsigned long *cdrom_numbers;
-static DECLARE_MUTEX(cdrom_sem);
-
 MODULE_PARM(debug, "i");
 MODULE_PARM(autoclose, "i");
 MODULE_PARM(autoeject, "i");
@@ -343,38 +340,6 @@
check_media_change: cdrom_media_changed,
 };
 
-/*
- * get or clear a new cdrom number, run under cdrom_sem
- */
-static int cdrom_get_entry(void)
-{
-   int i, nr, foo;
-
-   nr = 0;
-   foo = -1;
-   for (i = 0; i  CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
-   if (cdrom_numbers[i] == ~0UL) {
-   nr += sizeof(unsigned long) * 8;
-   continue;
-   }
-   foo = ffz(cdrom_numbers[i]);
-   set_bit(foo, cdrom_numbers[i]);
-   nr += foo;
-   break;
-   }
-
-   return foo == -1 ? foo : nr;
-}
-
-static void cdrom_clear_entry(struct cdrom_device_info *cdi)
-{
-   int bit_nr = cdi-nr  ~(sizeof(unsigned long) * 8);
-   int cd_index = cdi-nr / (sizeof(unsigned long) * 8);
-
-   clear_bit(bit_nr, cdrom_numbers[cd_index]);
-}
-
-
 /* This macro makes sure we don't have to check on cdrom_device_ops
  * existence in the run-time routines below. Change_capability is a
  * hack to have the capability flags defined const, while we can still
@@ -389,6 +354,7 @@
 struct cdrom_device_ops *cdo = cdi-ops;
 int *change_capability = (int *)cdo-capability; /* hack */
char vname[16];
+   static unsigned int cdrom_counter;
 
cdinfo(CD_OPEN, "entering register_cdrom\n"); 
 
@@ -429,17 +395,7 @@
 
if (!devfs_handle)
devfs_handle = devfs_mk_dir (NULL, "cdroms", NULL);
-
-   /*
-* get new cdrom number
-*/
-   down(cdrom_sem);
-   cdi-nr = cdrom_get_entry();
-   up(cdrom_sem);
-   if (cdi-nr == -1)
-   return -ENOMEM;
-
-   sprintf(vname, "cdrom%u", cdi-nr);
+   sprintf (vname, "cdrom%u", cdrom_counter++);
if (cdi-de) {
int pos;
devfs_handle_t slave;
@@ -462,13 +418,9 @@
S_IFBLK | S_IRUGO | S_IWUGO,
cdrom_fops, NULL);
}
-
-   down(cdrom_sem);
+   cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi-name);
cdi-next = topCdromPtr;
topCdromPtr = cdi;
-   up(cdrom_sem);
-
-   cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi-name);
return 0;
 }
 #undef ENSURE
@@ -477,14 +429,12 @@
 {
struct cdrom_device_info *cdi, *prev;
int major = MAJOR(unreg-dev);
-   int bit_nr, cd_index;
 
cdinfo(CD_OPEN, "entering unregister_cdrom\n"); 
 
if (major  0 || major = MAX_BLKDEV)
return -1;
 
-   down(cdrom_sem);
prev = NULL;
cdi = topCdromPtr;
while (cdi != NULL  cdi-dev != unreg-dev) {
@@ -492,20 +442,14 @@
cdi = cdi-next;
}
 
-   if (cdi == NULL) {
-   up(cdrom_sem);
+   if (cdi == NULL)
return -2;
-   }
-
-   cdrom_clear_entry(cdi);
-
if (prev)
prev-next = cdi-next;
else
topCdromPtr = cdi-next;
-   up(cdrom_sem);
cdi-ops-n_minors--;
-   devfs_unregister(cdi-de);
+   devfs_unregister (cdi-de);
cdinfo(CD_REG_UNREG, "drive \"/dev/%s\" unregistered\n", cdi-name);
return 0;
 }
@@ -514,14 +458,10 @@
 {
struct cdrom_device_info *cdi;
 
-   down(cdrom_sem);
-
cdi = topCdromPtr;
while (cdi != NULL  cdi-dev != dev)
cdi = cdi-next;
 
-   up(cdrom_sem);
-
return cdi;
 }
 
@@ -2489,8 +2429,6 @@
}
 
pos = sprintf(info, "CD-ROM information, " VERSION "\n");
-
-   down(cdrom_sem);

pos += sprintf(info+pos, "\ndrive name:\t");
for (cdi=topCdromPtr;cdi!=NULL;cdi=cdi-next)
@@ -2560,8 +2498,6 @@
for