Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
Gabriel C wrote: > Hello, > > sdparm and hdparm are broken for me on git ( > abce891a10559343d8ac9f79b46d78afdba63a40 ) > > > ~$ sudo hdparm /dev/sdc > > /dev/sdc: > BLKROGET failed: Inappropriate ioctl for device > BLKRAGET failed: Inappropriate ioctl for device > BLKGETSIZE failed: Inappropriate ioctl for device > > > ~$ sudo sdparm --all /dev/sdc > unable to access /dev/sdc, ATA disk? > > Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. Maybe a bit off topic but it depends on EXPERIMENTAL so why the the menu is not telling this ? and why the default is 'y' for it ? IMO everything depends on EXPERIMENTAL should 1) Tell it is EXPERIMENTAL ( visible to the user in menu ) " Foo New stuff ( EXPERIMENTAL ) " 2) Should not default to 'y' , is up to the users/admins to set EXPERIMENTAL things to Y/M , isn't it ? ( PS: there are even defconfigs with EXPERIMENTAL things set to y but this is really off topic ) Regards, Gabriel C - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
From: Gabriel C <[EMAIL PROTECTED]> Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git Date: Tue, 17 Jul 2007 02:44:38 +0200 > Gabriel C wrote: > > Hello, > > > > sdparm and hdparm are broken for me on git ( > > abce891a10559343d8ac9f79b46d78afdba63a40 ) > > > > > > ~$ sudo hdparm /dev/sdc > > > > /dev/sdc: > > BLKROGET failed: Inappropriate ioctl for device > > BLKRAGET failed: Inappropriate ioctl for device > > BLKGETSIZE failed: Inappropriate ioctl for device > > > > > > ~$ sudo sdparm --all /dev/sdc > > unable to access /dev/sdc, ATA disk? > > > > > > Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. Can you check the major number of your /dev/sdc? I've seen that /dev/sd* is linked to bsg devices somehow. > Maybe a bit off topic but it depends on EXPERIMENTAL so why the the menu > is not telling this ? and why the default is 'y' for it ? > > IMO everything depends on EXPERIMENTAL should > > 1) Tell it is EXPERIMENTAL ( visible to the user in menu ) " Foo New > stuff ( EXPERIMENTAL ) " > 2) Should not default to 'y' , is up to the users/admins to set > EXPERIMENTAL things to Y/M , isn't it ? > > > ( PS: there are even defconfigs with EXPERIMENTAL things set to y but > this is really off topic ) I'll fix it, thanks. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
FUJITA Tomonori wrote: > From: Gabriel C <[EMAIL PROTECTED]> > Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git > Date: Tue, 17 Jul 2007 02:44:38 +0200 > > >> Gabriel C wrote: >> >>> Hello, >>> >>> sdparm and hdparm are broken for me on git ( >>> abce891a10559343d8ac9f79b46d78afdba63a40 ) >>> >>> >>> ~$ sudo hdparm /dev/sdc >>> >>> /dev/sdc: >>> BLKROGET failed: Inappropriate ioctl for device >>> BLKRAGET failed: Inappropriate ioctl for device >>> BLKGETSIZE failed: Inappropriate ioctl for device >>> >>> >>> ~$ sudo sdparm --all /dev/sdc >>> unable to access /dev/sdc, ATA disk? >>> >>> >>> >> Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. >> > > Can you check the major number of your /dev/sdc? I've seen that > /dev/sd* is linked to bsg devices somehow. > > > All my disks are doing this sdc was meant as example. ... $ ls -la /dev/sd{a,b,c} brw-r- 1 root disk 8, 0 16. Jul 23:11 /dev/sda brw-rw 1 root disk 8, 16 16. Jul 23:11 /dev/sdb brw-r- 1 root disk 8, 32 16. Jul 23:11 /dev/sdc ... sd{a,b} are SCSI disks and sdc is an ATA disk. You can get the used config from there : http://194.231.229.228/2.6.22-gabce891a/config Gabriel - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
From: Gabriel C <[EMAIL PROTECTED]> Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git Date: Tue, 17 Jul 2007 03:40:58 +0200 > FUJITA Tomonori wrote: > > From: Gabriel C <[EMAIL PROTECTED]> > > Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git > > Date: Tue, 17 Jul 2007 02:44:38 +0200 > > > > > >> Gabriel C wrote: > >> > >>> Hello, > >>> > >>> sdparm and hdparm are broken for me on git ( > >>> abce891a10559343d8ac9f79b46d78afdba63a40 ) > >>> > >>> > >>> ~$ sudo hdparm /dev/sdc > >>> > >>> /dev/sdc: > >>> BLKROGET failed: Inappropriate ioctl for device > >>> BLKRAGET failed: Inappropriate ioctl for device > >>> BLKGETSIZE failed: Inappropriate ioctl for device > >>> > >>> > >>> ~$ sudo sdparm --all /dev/sdc > >>> unable to access /dev/sdc, ATA disk? > >>> > >>> > >>> > >> Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. I've not tested this yet (need to find sata drives in my workplace), but James Bottomley told me that both works for him with bsg enabled. It might worth trying the latest git tree. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
FUJITA Tomonori wrote: > From: Gabriel C <[EMAIL PROTECTED]> > Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git > Date: Tue, 17 Jul 2007 03:40:58 +0200 > > >> FUJITA Tomonori wrote: >> >>> From: Gabriel C <[EMAIL PROTECTED]> >>> Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git >>> Date: Tue, 17 Jul 2007 02:44:38 +0200 >>> >>> >>> >>>> Gabriel C wrote: >>>> >>>> >>>>> Hello, >>>>> >>>>> sdparm and hdparm are broken for me on git ( >>>>> abce891a10559343d8ac9f79b46d78afdba63a40 ) >>>>> >>>>> >>>>> ~$ sudo hdparm /dev/sdc >>>>> >>>>> /dev/sdc: >>>>> BLKROGET failed: Inappropriate ioctl for device >>>>> BLKRAGET failed: Inappropriate ioctl for device >>>>> BLKGETSIZE failed: Inappropriate ioctl for device >>>>> >>>>> >>>>> ~$ sudo sdparm --all /dev/sdc >>>>> unable to access /dev/sdc, ATA disk? >>>>> >>>>> >>>>> >>>>> >>>> Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. >>>> > > I've not tested this yet (need to find sata drives in my workplace), > but James Bottomley told me that both works for him with bsg enabled. > It might worth trying the latest git tree. > > Hi , I'm running current git head and this problem still exists. [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ git rev-parse --verify HEAD 5bae7ac9feba925fd0099057f6b23d7be80b7b41 With BLK_DEV_BSG=n [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo sdparm /dev/sda /dev/sda: SEAGATE ST318406LW 0109 Read write error recovery mode page: AWRE 1 [cha: y, def: 1, sav: 1] ARRE 1 [cha: y, def: 1, sav: 1] PER 0 [cha: y, def: 0, sav: 0] Caching (SBC) mode page: WCE 1 [cha: y, def: 1, sav: 1] RCD 0 [cha: y, def: 0, sav: 0] Control mode page: SWP 0 [cha: n, def: 0, sav: 0] Informational exceptions control mode page: EWASC 0 [cha: n, def: 0, sav: 0] DEXCPT 0 [cha: y, def: 0, sav: 0] MRIE 0 [cha: y, def: 0, sav: 0] [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo sdparm /dev/sdb /dev/sdb: FUJITSU MAH3182MP 0114 Read write error recovery mode page: AWRE 0 [cha: y, def: 0, sav: 0] ARRE 1 [cha: y, def: 1, sav: 1] PER 0 [cha: y, def: 0, sav: 0] Caching (SBC) mode page: WCE 1 [cha: y, def: 1, sav: 1] RCD 0 [cha: y, def: 0, sav: 0] Control mode page: SWP 0 [cha: n, def: 0, sav: 0] Informational exceptions control mode page: EWASC 1 [cha: y, def: 0, sav: 1] DEXCPT 0 [cha: y, def: 1, sav: 0] MRIE 6 [cha: y, def: 0, sav: 6] [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo sdparm /dev/sdc /dev/sdc: ATA SAMSUNG SP1203N TL10 Read write error recovery mode page: AWRE 1 ARRE 1 PER 0 Caching (SBC) mode page: WCE 1 RCD 0 Control mode page: SWP 0 [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo hdparm /dev/sda /dev/sda: readonly = 0 (off) readahead = 256 (on) geometry = 2231/255/63, sectors = 35843670, start = 0 [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo hdparm /dev/sdb /dev/sdb: readonly = 0 (off) readahead = 256 (on) geometry = /255/63, sectors = 35701260, start = 0 [EMAIL PROTECTED]:/work/crazy/linux-git/linux2.6$ sudo hdparm /dev/sdc /dev/sdc: IO_support = 0 (default 16-bit) readonly = 0 (off) readahead = 256 (on) geometry = 14596/255/63, sectors = 234493056, start = 0 And this when set to y [EMAIL PROTECTED]:~$ sudo hdparm /dev/sda /dev/sda: BLKROGET failed: Inappropriate ioctl for device BLKRAGET failed: Inappropriate ioctl for device BLKGETSIZE failed: Inappropriate ioctl for device [EMAIL PROTECTED]:~$ sudo hdparm /dev/sdb /dev/sdb: BLKROGET failed: Inappropriate ioctl for device BLKRAGET failed: Inappropriate ioctl for device BLKGETSIZE failed: Inappropriate ioctl for device [EMAIL PROTECTED]:~$ sudo hdparm /dev/sdc /dev/sdc: BLKROGET failed: Inappropriate ioctl for device BLKRAGET failed: Inappropriate ioctl for device BLKGETSIZE failed: Inappropriate ioctl for device [EMAIL PROTECTED]:~$ sudo sdparm /dev/sdc unable to access /dev/sdc, ATA disk? [EMAIL PROTECTED]:~$ sudo sdparm /dev/sdb unable to access /dev/sdb, ATA disk? [EMAIL PROTECTED]:~$ sudo sdparm /dev/sda unable to access /dev/sda, ATA disk? [EMAIL PROTECTED]:~$ dmesg|grep bsg [ 41.411171] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253) Smartd now spams the dmesg too with : snip [ 75.329927] program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO [ 75.334267] program smartd is using a deprecated SCSI ioctl, please convert it to SG_IO [ 75.334396] program smartd is using a deprecated SCSI ioctl, please
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
On Thu, 2007-07-19 at 08:25 +0900, FUJITA Tomonori wrote: > From: Gabriel C <[EMAIL PROTECTED]> > Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git > Date: Tue, 17 Jul 2007 03:40:58 +0200 > > > FUJITA Tomonori wrote: > > > From: Gabriel C <[EMAIL PROTECTED]> > > > Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git > > > Date: Tue, 17 Jul 2007 02:44:38 +0200 > > > > > > > > >> Gabriel C wrote: > > >> > > >>> Hello, > > >>> > > >>> sdparm and hdparm are broken for me on git ( > > >>> abce891a10559343d8ac9f79b46d78afdba63a40 ) > > >>> > > >>> > > >>> ~$ sudo hdparm /dev/sdc > > >>> > > >>> /dev/sdc: > > >>> BLKROGET failed: Inappropriate ioctl for device > > >>> BLKRAGET failed: Inappropriate ioctl for device > > >>> BLKGETSIZE failed: Inappropriate ioctl for device > > >>> > > >>> > > >>> ~$ sudo sdparm --all /dev/sdc > > >>> unable to access /dev/sdc, ATA disk? > > >>> > > >>> > > >>> > > >> Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. > > I've not tested this yet (need to find sata drives in my workplace), > but James Bottomley told me that both works for him with bsg enabled. > It might worth trying the latest git tree. It certainly does work for me. However, my ATA devices are connected to an aic94xx SAS controller. Although this uses libata, the ioctl path is probably slightly different from the libata one. I assume you're using a SATA controller? Unfortunately I have no ability to test on a SATA controller, but I'd suggest looking at the ioctl and REQ_BLOCK_PC paths in libata for clues. James - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
James Bottomley wrote: > On Thu, 2007-07-19 at 08:25 +0900, FUJITA Tomonori wrote: > >> From: Gabriel C <[EMAIL PROTECTED]> >> Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git >> Date: Tue, 17 Jul 2007 03:40:58 +0200 >> >> >>> FUJITA Tomonori wrote: >>> >>>> From: Gabriel C <[EMAIL PROTECTED]> >>>> Subject: Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git >>>> Date: Tue, 17 Jul 2007 02:44:38 +0200 >>>> >>>> >>>> >>>>> Gabriel C wrote: >>>>> >>>>> >>>>>> Hello, >>>>>> >>>>>> sdparm and hdparm are broken for me on git ( >>>>>> abce891a10559343d8ac9f79b46d78afdba63a40 ) >>>>>> >>>>>> >>>>>> ~$ sudo hdparm /dev/sdc >>>>>> >>>>>> /dev/sdc: >>>>>> BLKROGET failed: Inappropriate ioctl for device >>>>>> BLKRAGET failed: Inappropriate ioctl for device >>>>>> BLKGETSIZE failed: Inappropriate ioctl for device >>>>>> >>>>>> >>>>>> ~$ sudo sdparm --all /dev/sdc >>>>>> unable to access /dev/sdc, ATA disk? >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Well it is bsg , setting BLK_DEV_BSG=n fixed all this errors. >>>>> >> I've not tested this yet (need to find sata drives in my workplace), >> but James Bottomley told me that both works for him with bsg enabled. >> It might worth trying the latest git tree. >> > > It certainly does work for me. However, my ATA devices are connected to > an aic94xx SAS controller. Although this uses libata, the ioctl path is > probably slightly different from the libata one. I assume you're using a > SATA controller? Unfortunately I have no ability to test on a SATA > controller, but I'd suggest looking at the ioctl and REQ_BLOCK_PC paths > in libata for clues. > No is not an SATA controller. sda and sdb are SCSI disks connected to an Adaptec AIC-7892P U160/m controller using the aic7xxx driver. sdc is an ATA-7 disk connected to an IDE controller ( 82801BA IDE U100 ) using libata and the ata_piix driver. $ lspci -nn 00:00.0 Host bridge [0600]: Intel Corporation 82860 860 (Wombat) Chipset Host Bridge (MCH) [8086:2531] (rev 04) 00:01.0 PCI bridge [0604]: Intel Corporation 82850 850 (Tehama) Chipset AGP Bridge [8086:2532] (rev 04) 00:02.0 PCI bridge [0604]: Intel Corporation 82860 860 (Wombat) Chipset AGP Bridge [8086:2533] (rev 04) 00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 04) 00:1f.0 ISA bridge [0601]: Intel Corporation 82801BA ISA Bridge (LPC) [8086:2440] (rev 04) 00:1f.1 IDE interface [0101]: Intel Corporation 82801BA IDE U100 Controller [8086:244b] (rev 04) 00:1f.2 USB Controller [0c03]: Intel Corporation 82801BA/BAM USB Controller #1 [8086:2442] (rev 04) 00:1f.3 SMBus [0c05]: Intel Corporation 82801BA/BAM SMBus Controller [8086:2443] (rev 04) 00:1f.4 USB Controller [0c03]: Intel Corporation 82801BA/BAM USB Controller #1 [8086:2444] (rev 04) 00:1f.5 Multimedia audio controller [0401]: Intel Corporation 82801BA/BAM AC'97 Audio Controller [8086:2445] (rev 04) 01:00.0 VGA compatible controller [0300]: nVidia Corporation NV11 [GeForce2 MX/MX 400] [10de:0110] (rev a1) 02:1f.0 PCI bridge [0604]: Intel Corporation 82806AA PCI64 Hub PCI Bridge [8086:1360] (rev 03) 03:00.0 PIC [0800]: Intel Corporation 82806AA PCI64 Hub Advanced Programmable Interrupt Controller [8086:1161] (rev 01) 03:0e.0 SCSI storage controller [0100]: Adaptec AIC-7892P U160/m [9005:008f] (rev 02) 04:0b.0 Ethernet controller [0200]: 3Com Corporation 3c905C-TX/TX-M [Tornado] [10b7:9200] (rev 78) 04:0c.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB12LV26 IEEE-1394 Controller (Link) [104c:8020] 04:0f.0 USB Controller [0c03]: NEC Corporation USB [1033:0035] (rev 41) 04:0f.1 USB Controller [0c03]: NEC Corporation USB [1033:0035] (rev 41) 04:0f.2 USB Controller [0c03]: NEC Corporation USB 2.0 [1033:00e0] (rev 02) > James > > Gabriel - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
On Thu, 2007-07-19 at 16:31 +0200, Gabriel C wrote: > No is not an SATA controller. > > sda and sdb are SCSI disks connected to an Adaptec AIC-7892P U160/m > controller using the aic7xxx driver. OK, this definitely works for me, that's what my root disk is on. I think this isn't a kernel problem ... I think it's a udev name clash problem. Try the attached patch, which corrects the names: > sdc is an ATA-7 disk connected to an IDE controller ( 82801BA IDE U100 > ) using libata and the ata_piix driver. James --- Index: BUILD-2.6/block/Kconfig === --- BUILD-2.6.orig/block/Kconfig2007-07-18 11:34:20.0 -0500 +++ BUILD-2.6/block/Kconfig 2007-07-18 11:36:24.0 -0500 @@ -53,7 +53,7 @@ endif # BLOCK config BLK_DEV_BSG bool "Block layer SG support v4 (EXPERIMENTAL)" - depends on (SCSI=y) && EXPERIMENTAL + depends on EXPERIMENTAL ---help--- Saying Y here will enable generic SG (SCSI generic) v4 support for any block device. Index: BUILD-2.6/block/bsg.c === --- BUILD-2.6.orig/block/bsg.c 2007-07-18 11:34:20.0 -0500 +++ BUILD-2.6/block/bsg.c 2007-07-18 11:36:24.0 -0500 @@ -1009,29 +1009,6 @@ err: } EXPORT_SYMBOL_GPL(bsg_register_queue); -static int bsg_add(struct class_device *cl_dev, struct class_interface *cl_intf) -{ - int ret; - struct scsi_device *sdp = to_scsi_device(cl_dev->dev); - struct request_queue *rq = sdp->request_queue; - - if (rq->kobj.parent) - ret = bsg_register_queue(rq, kobject_name(rq->kobj.parent)); - else - ret = bsg_register_queue(rq, kobject_name(&sdp->sdev_gendev.kobj)); - return ret; -} - -static void bsg_remove(struct class_device *cl_dev, struct class_interface *cl_intf) -{ - bsg_unregister_queue(to_scsi_device(cl_dev->dev)->request_queue); -} - -static struct class_interface bsg_intf = { - .add= bsg_add, - .remove = bsg_remove, -}; - static struct cdev bsg_cdev = { .kobj = {.name = "bsg", }, .owner = THIS_MODULE, @@ -1069,16 +1046,9 @@ static int __init bsg_init(void) if (ret) goto unregister_chrdev; - ret = scsi_register_interface(&bsg_intf); - if (ret) - goto remove_cdev; - printk(KERN_INFO BSG_DESCRIPTION " version " BSG_VERSION " loaded (major %d)\n", bsg_major); return 0; -remove_cdev: - printk(KERN_ERR "bsg: failed register scsi interface %d\n", ret); - cdev_del(&bsg_cdev); unregister_chrdev: unregister_chrdev_region(MKDEV(bsg_major, 0), BSG_MAX_DEVS); destroy_bsg_class: Index: BUILD-2.6/drivers/scsi/scsi_sysfs.c === --- BUILD-2.6.orig/drivers/scsi/scsi_sysfs.c2007-07-18 11:36:02.0 -0500 +++ BUILD-2.6/drivers/scsi/scsi_sysfs.c 2007-07-19 10:10:50.0 -0500 @@ -715,6 +715,7 @@ static int attr_add(struct device *dev, int scsi_sysfs_add_sdev(struct scsi_device *sdev) { int error, i; + struct request_queue *rq = sdev->request_queue; if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0) return error; @@ -734,6 +735,17 @@ int scsi_sysfs_add_sdev(struct scsi_devi /* take a reference for the sdev_classdev; this is * released by the sdev_class .release */ get_device(&sdev->sdev_gendev); + + error = bsg_register_queue(rq, sdev->sdev_gendev.bus_id); + + if (error) + sdev_printk(KERN_INFO, sdev, + "Failed to register bsg queue, errno=%d\n", error); + + /* we're treating error on bsg register as non-fatal, so pretend +* nothing went wrong */ + error = 0; + if (sdev->host->hostt->sdev_attrs) { for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) { error = attr_add(&sdev->sdev_gendev, @@ -780,6 +792,7 @@ void __scsi_remove_device(struct scsi_de if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) return; + bsg_unregister_queue(sdev->request_queue); class_device_unregister(&sdev->sdev_classdev); transport_remove_device(dev); device_del(dev); - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Someone ( bsg merge ? ) broke {sd,hd}parm on current git
James Bottomley wrote: > On Thu, 2007-07-19 at 16:31 +0200, Gabriel C wrote: > >> No is not an SATA controller. >> >> sda and sdb are SCSI disks connected to an Adaptec AIC-7892P U160/m >> controller using the aic7xxx driver. >> > > OK, this definitely works for me, that's what my root disk is on. I > think this isn't a kernel problem ... I think it's a udev name clash > problem. Try the attached patch, which corrects the names: > Thx, your patch fixes the problem for me. > >> sdc is an ATA-7 disk connected to an IDE controller ( 82801BA IDE U100 >> ) using libata and the ata_piix driver. >> > > > James > > --- > > Index: BUILD-2.6/block/Kconfig > === > --- BUILD-2.6.orig/block/Kconfig 2007-07-18 11:34:20.0 -0500 > +++ BUILD-2.6/block/Kconfig 2007-07-18 11:36:24.0 -0500 > @@ -53,7 +53,7 @@ endif # BLOCK > > config BLK_DEV_BSG > bool "Block layer SG support v4 (EXPERIMENTAL)" > - depends on (SCSI=y) && EXPERIMENTAL > + depends on EXPERIMENTAL > ---help--- > Saying Y here will enable generic SG (SCSI generic) v4 support > for any block device. > Index: BUILD-2.6/block/bsg.c > === > --- BUILD-2.6.orig/block/bsg.c2007-07-18 11:34:20.0 -0500 > +++ BUILD-2.6/block/bsg.c 2007-07-18 11:36:24.0 -0500 > @@ -1009,29 +1009,6 @@ err: > } > EXPORT_SYMBOL_GPL(bsg_register_queue); > > -static int bsg_add(struct class_device *cl_dev, struct class_interface > *cl_intf) > -{ > - int ret; > - struct scsi_device *sdp = to_scsi_device(cl_dev->dev); > - struct request_queue *rq = sdp->request_queue; > - > - if (rq->kobj.parent) > - ret = bsg_register_queue(rq, kobject_name(rq->kobj.parent)); > - else > - ret = bsg_register_queue(rq, > kobject_name(&sdp->sdev_gendev.kobj)); > - return ret; > -} > - > -static void bsg_remove(struct class_device *cl_dev, struct class_interface > *cl_intf) > -{ > - bsg_unregister_queue(to_scsi_device(cl_dev->dev)->request_queue); > -} > - > -static struct class_interface bsg_intf = { > - .add= bsg_add, > - .remove = bsg_remove, > -}; > - > static struct cdev bsg_cdev = { > .kobj = {.name = "bsg", }, > .owner = THIS_MODULE, > @@ -1069,16 +1046,9 @@ static int __init bsg_init(void) > if (ret) > goto unregister_chrdev; > > - ret = scsi_register_interface(&bsg_intf); > - if (ret) > - goto remove_cdev; > - > printk(KERN_INFO BSG_DESCRIPTION " version " BSG_VERSION > " loaded (major %d)\n", bsg_major); > return 0; > -remove_cdev: > - printk(KERN_ERR "bsg: failed register scsi interface %d\n", ret); > - cdev_del(&bsg_cdev); > unregister_chrdev: > unregister_chrdev_region(MKDEV(bsg_major, 0), BSG_MAX_DEVS); > destroy_bsg_class: > Index: BUILD-2.6/drivers/scsi/scsi_sysfs.c > === > --- BUILD-2.6.orig/drivers/scsi/scsi_sysfs.c 2007-07-18 11:36:02.0 > -0500 > +++ BUILD-2.6/drivers/scsi/scsi_sysfs.c 2007-07-19 10:10:50.0 > -0500 > @@ -715,6 +715,7 @@ static int attr_add(struct device *dev, > int scsi_sysfs_add_sdev(struct scsi_device *sdev) > { > int error, i; > + struct request_queue *rq = sdev->request_queue; > > if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0) > return error; > @@ -734,6 +735,17 @@ int scsi_sysfs_add_sdev(struct scsi_devi > /* take a reference for the sdev_classdev; this is >* released by the sdev_class .release */ > get_device(&sdev->sdev_gendev); > + > + error = bsg_register_queue(rq, sdev->sdev_gendev.bus_id); > + > + if (error) > + sdev_printk(KERN_INFO, sdev, > + "Failed to register bsg queue, errno=%d\n", error); > + > + /* we're treating error on bsg register as non-fatal, so pretend > + * nothing went wrong */ > + error = 0; > + > if (sdev->host->hostt->sdev_attrs) { > for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) { > error = attr_add(&sdev->sdev_gendev, > @@ -780,6 +792,7 @@ void __scsi_remove_device(struct scsi_de > if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) > return; > > + bsg_unregister_queue(sdev->request_queue); > class_device_unregister(&sdev->sdev_classdev); > transport_remove_device(dev); > device_del(dev); > > > > > - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html