* Re: SiI3124 + SiI3726 pm [not found] ` <89d273ba0605242202l354ec106w22bccf649e5e1dfc@mail.gmail.com> @ 2006-05-25 5:07 ` Tejun Heo 2006-05-25 20:29 ` saeed bishara 0 siblings, 1 reply; 6+ messages in thread From: Tejun Heo @ 2006-05-25 5:07 UTC (permalink / raw) To: Jérôme VUARAND; +Cc: linux-ide [-- Attachment #1: Type: text/plain, Size: 466 bytes --] Jérôme VUARAND wrote: > I just realised after the mail that the driver was really thinking > there are 6 ports on the pm, since it's testing ata3.05 and ata4.05. > These don't exist and generate errors. There's a bug somewhere and > here is a workaround I made quickly to have correct enumeration > behaviour (I hope no automatic process parse mails on this mailing > list for patches, coz this one is not really clean) : Can you try the attached patch? -- tejun [-- Attachment #2: patch --] [-- Type: text/plain, Size: 561 bytes --] diff --git a/drivers/scsi/libata-pm.c b/drivers/scsi/libata-pm.c index 002d8b2..7a56ab7 100644 --- a/drivers/scsi/libata-pm.c +++ b/drivers/scsi/libata-pm.c @@ -327,6 +327,14 @@ static void ata_pm_quirks(u32 *gscr, int *nr_ports -= 2; *link_flags |= ATA_LFLAG_HRST_TO_RESUME; } + + /* Sil3726 reports one extra port and needs hardreset to + * resume PM link. + */ + if (vendor == 0x1095 && devid == 0x3726) { + *nr_ports -= 1; + *link_flags |= ATA_LFLAG_HRST_TO_RESUME; + } } static int ata_pm_configure(struct ata_device *dev, int *r_nr_ports, ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: SiI3124 + SiI3726 pm 2006-05-25 5:07 ` SiI3124 + SiI3726 pm Tejun Heo @ 2006-05-25 20:29 ` saeed bishara 2006-05-25 20:54 ` Tejun Heo 0 siblings, 1 reply; 6+ messages in thread From: saeed bishara @ 2006-05-25 20:29 UTC (permalink / raw) To: Tejun Heo; +Cc: Jérôme VUARAND, linux-ide Hi, I think the 6th port is for the SEMB(Sata Enclosure Management Bridge) device, this device reportssignature with lbam=0x3c and lbah 0xc3, but the linux classifies it as a disk: if (((tf->lbam == 0) && (tf->lbah == 0)) || ((tf->lbam == 0x3c) && (tf->lbah == 0xc3))) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DPRINTK("found ATA device by sig\n"); return ATA_DEV_ATA; Can you print the signature of the device on that port? Anyway, the 0x3C, 0xC3 signature should be classifies as a SEMB device and not a disk according to the SATA standard. saeed On 5/25/06, Tejun Heo <htejun@gmail.com> wrote: > Jérôme VUARAND wrote: > > I just realised after the mail that the driver was really thinking > > there are 6 ports on the pm, since it's testing ata3.05 and ata4.05. > > These don't exist and generate errors. There's a bug somewhere and > > here is a workaround I made quickly to have correct enumeration > > behaviour (I hope no automatic process parse mails on this mailing > > list for patches, coz this one is not really clean) : > > Can you try the attached patch? > > -- > tejun > > > diff --git a/drivers/scsi/libata-pm.c b/drivers/scsi/libata-pm.c > index 002d8b2..7a56ab7 100644 > --- a/drivers/scsi/libata-pm.c > +++ b/drivers/scsi/libata-pm.c > @@ -327,6 +327,14 @@ static void ata_pm_quirks(u32 *gscr, int > *nr_ports -= 2; > *link_flags |= ATA_LFLAG_HRST_TO_RESUME; > } > + > + /* Sil3726 reports one extra port and needs hardreset to > + * resume PM link. > + */ > + if (vendor == 0x1095 && devid == 0x3726) { > + *nr_ports -= 1; > + *link_flags |= ATA_LFLAG_HRST_TO_RESUME; > + } > } > > static int ata_pm_configure(struct ata_device *dev, int *r_nr_ports, > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SiI3124 + SiI3726 pm 2006-05-25 20:29 ` saeed bishara @ 2006-05-25 20:54 ` Tejun Heo 2009-07-27 18:03 ` Jerome Vuarand 0 siblings, 1 reply; 6+ messages in thread From: Tejun Heo @ 2006-05-25 20:54 UTC (permalink / raw) To: saeed bishara; +Cc: Jérôme VUARAND, linux-ide saeed bishara wrote: > Hi, > I think the 6th port is for the SEMB(Sata Enclosure Management > Bridge) device, this device reportssignature with lbam=0x3c and lbah > 0xc3, but the linux classifies it as a disk: > > if (((tf->lbam == 0) && (tf->lbah == 0)) || > ((tf->lbam == 0x3c) && (tf->lbah == 0xc3))) { > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > DPRINTK("found ATA device by sig\n"); > return ATA_DEV_ATA; > > Can you print the signature of the device on that port? > Anyway, the 0x3C, 0xC3 signature should be classifies as a SEMB device > and not a disk according to the SATA standard. I haven't actually checked that signature but that's probably the same class code mix up described for PM in the classification function. For the time being, libata is just ignoring the extra port. It probably should be exported as a SCSI device without HLD attached (/dev/sgX only). I'll try that once hotplug stuff settles. Thanks. -- tejun ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SiI3124 + SiI3726 pm 2006-05-25 20:54 ` Tejun Heo @ 2009-07-27 18:03 ` Jerome Vuarand 2009-07-28 2:38 ` Tejun Heo 0 siblings, 1 reply; 6+ messages in thread From: Jerome Vuarand @ 2009-07-27 18:03 UTC (permalink / raw) To: linux-ide; +Cc: saeed bishara, Tejun Heo 2006/5/25 Tejun Heo <htejun@gmail.com>: > saeed bishara wrote: >> >> Hi, >> I think the 6th port is for the SEMB(Sata Enclosure Management >> Bridge) device, this device reportssignature with lbam=0x3c and lbah >> 0xc3, but the linux classifies it as a disk: >> >> if (((tf->lbam == 0) && (tf->lbah == 0)) || >> ((tf->lbam == 0x3c) && (tf->lbah == 0xc3))) { >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> DPRINTK("found ATA device by sig\n"); >> return ATA_DEV_ATA; >> >> Can you print the signature of the device on that port? >> Anyway, the 0x3C, 0xC3 signature should be classifies as a SEMB device >> and not a disk according to the SATA standard. > > I haven't actually checked that signature but that's probably the same class > code mix up described for PM in the classification function. For the time > being, libata is just ignoring the extra port. It probably should be > exported as a SCSI device without HLD attached (/dev/sgX only). I'll try > that once hotplug stuff settles. A few months ago I updated my kernel since it now supports port multipliers without patch, and the issue of a supplementary port on the SiI3727 port multiplier rose again. Since I completely forgot about that 3 year old issue, I started exploring the web again before remembering that thread. I found something interesting in the SiI3726 datasheet (http://www.siliconimage.com/docs/SiI-DS-0121-C1.pdf). You can see on PDF page 14/41, in the description of the GSCR[2] register, that the 4 least significant bits of the register are labelled "Number of Fan-out ports". In the description besides, it is explained that the initial value is 6, and it represents the 5 downstream device ports plus the upstream host port. I don't have access to the SATA Port Multiplier specification, but it would be interesting to check it to verify whether that 4-bit field of the GSCR[2] register is supposed to contain the number of device ports (and in that case the problem comes from the SiI3726 firmware) or if that value is the total number of up+down ports of the multiplier. In the latter case another mechanism to detect the number of device ports would be needed (unless multipliers can have several host ports, for multipath or device sharing, a simple substraction of 1 could be enough). In the meantime I'll re-apply the patch Tejun Heo proposed earlier in that thread. It seems I didn't notice Saeed Bishara request for tests last time. Tell me if you're still interested in that information, or if you need any other information to help improve the SiI3726 driver. I have 6 of these port multipliers (and I suspect some of these are damaged), and 15 to 20 SATA disks available, so there's plenty of room for tests. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SiI3124 + SiI3726 pm 2009-07-27 18:03 ` Jerome Vuarand @ 2009-07-28 2:38 ` Tejun Heo 2009-07-28 15:01 ` Jerome Vuarand 0 siblings, 1 reply; 6+ messages in thread From: Tejun Heo @ 2009-07-28 2:38 UTC (permalink / raw) To: Jerome Vuarand; +Cc: linux-ide, saeed bishara Hello, Jerome. Jerome Vuarand wrote: > A few months ago I updated my kernel since it now supports port > multipliers without patch, and the issue of a supplementary port on > the SiI3727 port multiplier rose again. Since I completely forgot > about that 3 year old issue, I started exploring the web again before > remembering that thread. Hmm... this is supposed to be worked around by now. Can you please post boot log w/o the patch using 2.6.30? Thanks. -- tejun ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: SiI3124 + SiI3726 pm 2009-07-28 2:38 ` Tejun Heo @ 2009-07-28 15:01 ` Jerome Vuarand 0 siblings, 0 replies; 6+ messages in thread From: Jerome Vuarand @ 2009-07-28 15:01 UTC (permalink / raw) To: Tejun Heo; +Cc: linux-ide, saeed bishara 2009/7/28 Tejun Heo <htejun@gmail.com>: > Jerome Vuarand wrote: >> A few months ago I updated my kernel since it now supports port >> multipliers without patch, and the issue of a supplementary port on >> the SiI3727 port multiplier rose again. Since I completely forgot >> about that 3 year old issue, I started exploring the web again before >> remembering that thread. > > Hmm... this is supposed to be worked around by now. Can you please > post boot log w/o the patch using 2.6.30? Yes, actually when about to apply the patch, I realized the 6th port is actually recognized as the PMP SEMB. I guess the datasheet is somewhat incorrect on that precise page, since it mentions the SEMB device in other sections. The wiki is somewhat terse about PMP support (for example it's not very clear what drivers and controller combination support PMPs), and afaict there is no mention of SEMB support status (I don't think my PMPs have something connected to the I²C port of the SiI3726, but that may be helpful to other people). I moved all my disks to some spare PMP and all my disk detection problems are gone. I guess some of them are really damaged (also I had some power issue within my SATA enclosure). Sorry for the noise :-) ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-07-28 15:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <89d273ba0605242046x3d19dd06h74885048f229d519@mail.gmail.com>
[not found] ` <89d273ba0605242202l354ec106w22bccf649e5e1dfc@mail.gmail.com>
2006-05-25 5:07 ` SiI3124 + SiI3726 pm Tejun Heo
2006-05-25 20:29 ` saeed bishara
2006-05-25 20:54 ` Tejun Heo
2009-07-27 18:03 ` Jerome Vuarand
2009-07-28 2:38 ` Tejun Heo
2009-07-28 15:01 ` Jerome Vuarand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).