Re: SCSI trow USB-STORAGE or SBP2 Debug for buggy device Kernels 2.6.X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok, this is what I've got.

PLUGGING DEVICE
Apr 24 16:11:15 gusgus kernel: ehci_hcd 0000:00:10.4: EHCI Host Controller
Apr 24 16:11:15 gusgus kernel: ehci_hcd 0000:00:10.4: new USB bus registered, 
assigned bus number 7
Apr 24 16:11:15 gusgus kernel: ehci_hcd 0000:00:10.4: irq 20, io mem 
0xe3005000
Apr 24 16:11:15 gusgus kernel: ehci_hcd 0000:00:10.4: USB 2.0 initialized, 
EHCI 1.00, driver 10 Dec 2004
Apr 24 16:11:15 gusgus kernel: hub 7-0:1.0: USB hub found
Apr 24 16:11:15 gusgus kernel: hub 7-0:1.0: 8 ports detected
Apr 24 16:11:16 gusgus kernel: usb 7-1: new high speed USB device using 
ehci_hcd and address 2
Apr 24 16:11:16 gusgus kernel: scsi1 : SCSI emulation for USB Mass Storage 
devices
Apr 24 16:11:16 gusgus kernel: usb 1-1: USB disconnect, address 2
Apr 24 16:11:21 gusgus kernel:   Vendor: PIONEER   Model: DVD-RW  DVR-110D  
Rev: 1.37
Apr 24 16:11:21 gusgus kernel:   Type:   CD-ROM                             
ANSI SCSI revision: 00
Apr 24 16:11:21 gusgus kernel: sr0: scsi3-mmc drive: 62x/62x writer cd/rw 
xa/form2 cdda tray
Apr 24 16:11:21 gusgus scsi.agent[8940]: cdrom 
at /devices/pci0000:00/0000:00:10.4/usb7/7-1/7-1:1.0/host1/target1:0:0/1:0:0:0
Apr 24 16:12:14 gusgus kernel: sr 1:0:0:0: Device not ready: <6>: Current: 
sense key=0x2
Apr 24 16:12:14 gusgus kernel:     ASC=0x4 ASCQ=0x8
Apr 24 16:13:03 gusgus kernel: sr 1:0:0:0: Device not ready: <6>: Current: 
sense key=0x2
Apr 24 16:13:03 gusgus kernel:     ASC=0x4 ASCQ=0x8
Apr 24 16:13:03 gusgus kernel: sr 1:0:0:0: Device not ready: <6>: Current: 
sense key=0x2
THIS ABOVE MESSAGES REPEATED TOO MANY TIMES LIKE ALWAYS

This Other is cause I left the print outside the brackets, cause I want to see 
on closing session.

Apr 24 16:13:03 gusgus kernel:     ASC=0x4 ASCQ=0x8
Apr 24 16:13:10 gusgus kernel: : Current: sense key=0x2
Apr 24 16:13:10 gusgus kernel:     ASC=0x3a ASCQ=0x0
Apr 24 16:13:10 gusgus kernel: : Current: sense key=0x2
Apr 24 16:13:10 gusgus kernel:     ASC=0x3a ASCQ=0x0
Apr 24 16:13:10 gusgus kernel: : Current: sense key=0x2
Apr 24 16:13:10 gusgus kernel:     ASC=0x3a ASCQ=0x0
Apr 24 16:13:10 gusgus kernel: : Current: sense key=0x2
Apr 24 16:13:10 gusgus kernel:     ASC=0x3a ASCQ=0x0
Apr 24 16:13:10 gusgus kernel: : Current: sense key=0x2
Apr 24 16:13:10 gusgus kernel:     ASC=0x3a ASCQ=0x0
FINISH WRITING

El Lunes, 24 de Abril de 2006 13:38, escribió:
> On Mon, 2006-04-24 at 10:29 -0500, Gustavo Guillermo Pérez wrote:
> > Then I have an Idea, what happen if on scsi_lib.c where resides the
> > faulty code:
> > if (!(req->flags & REQ_QUIET))
> >               dev_printk(KERN_INFO,
> >               &cmd->device->sdev_gendev,
> >               "Device not ready.\n");
> >               scsi_end_request(cmd, 0, this_count, 1);
> >               return;
> > I change scsi_end_request(cmd, 0, this_count, 1);
> > by a comparison about vendor ID and Model
> > and then if is a buggy one executes scsi_requeue_command(q, cmd); instead
> > of scsi_end_request(cmd, 0, this_count, 1);
>
> Let's actually debug the problem before trying to fix it.  It would be
> helpful to know what type of not-ready this is (and whether it's
> internally generated in usb or firewire, but that comes later).
>
> Try this addition and see what it tells us.
>
> James
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index 7b0f9a3..cd9df1b 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1074,9 +1074,12 @@ void scsi_io_completion(struct scsi_cmnd
>  				scsi_requeue_command(q, cmd);
>  				return;
>  			}
> -			if (!(req->flags & REQ_QUIET))
> +			if (!(req->flags & REQ_QUIET)) {
>  				scmd_printk(KERN_INFO, cmd,
> -					   "Device not ready.\n");
> +					   "Device not ready: ");
> +				scsi_print_sense_hdr("", &sshdr);
> +			}
> +
>  			scsi_end_request(cmd, 0, this_count, 1);
>  			return;
>  		case VOLUME_OVERFLOW:

-- 
Gustavo Guillermo Pérez
Compunauta uLinux
www.compunauta.com
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux