[JAUNTY] SRU: UBUNTU: libata: handle SEMB signature better
Stefan Bader
stefan.bader at canonical.com
Fri Apr 24 15:31:43 UTC 2009
ACK, header looks good to me as well as the patch
Manoj Iyer wrote:
> SRU JUSTIFICATION:
>
> IMPACT: Western Digital Caviar SE SATA 2nd Generation Hard Drive is not
> recognized by the kernel.
>
> FIX: Make ata_dev_classify() report ATA_DEV_SEMB on the
> sig and let ata_dev_read_id() work around it by trying IDENTIFY once.
>
> TEST: Originator of the bug has tested the kernel in
> http://people.ubuntu.com/~manjo/lp257790-jaunty/ and reported it works.
>
> The following changes since commit
> a63b7d7beeaa1f8f33369cab6419831fa8991e40:
> Tyler Hicks (1):
> UBUNTU: SAUCE: (drop after 2.6.28) [PATCH] eCryptfs: Larger buffer
> for encrypted symlink targets
>
> are available in the git repository at:
>
> git://kernel.ubuntu.com/manjo/ubuntu-jaunty.git lp257790
>
> Tejun Heo (1):
> UBUNTU: libata: handle SEMB signature better
>
> drivers/ata/libata-core.c | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
>
> From c21f5bb8fd1150e2006eee17a056723083970a45 Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj at kernel.org>
> Date: Wed, 15 Apr 2009 06:21:10 +0900
> Subject: [PATCH] UBUNTU: libata: handle SEMB signature better
>
> BUG: #257790
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/257790
>
> WDC WD1600JS-62MHB5 successfully hits the window between ATA/ATAPI-7
> and Serial ATA II standards and reports 3c/c3 signature which now is
> assigned to SEMB. Make ata_dev_classify() report ATA_DEV_SEMB on the
> sig and let ata_dev_read_id() work around it by trying IDENTIFY once.
>
> This fixes bko#11579.
>
> Signed-off-by: Tejun Heo <tj at kernel.org>
> Reported-by: David Haun <drhaun88 at gmail.com>
> Reported-by: Lars Wirzenius <liw at liw.fi>
> Reported-by: Juan Manuel <jmcarranza at gmail.com>
> Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
> Signed-off-by: Manoj Iyer <manoj.iyer at canonical.com>
>
> Author: Tejun Heo <tj at kernel.org>
> ---
> drivers/ata/libata-core.c | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 3366993..9844eb6 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -1159,6 +1159,9 @@ unsigned int ata_dev_classify(const struct ata_taskfile *tf)
> *
> * We follow the current spec and consider that 0x69/0x96
> * identifies a port multiplier and 0x3c/0xc3 a SEMB device.
> + * Unfortunately, WDC WD1600JS-62MHB5 (a hard drive) reports
> + * SEMB signature. This is worked around in
> + * ata_dev_read_id().
> */
> if ((tf->lbam == 0) && (tf->lbah == 0)) {
> DPRINTK("found ATA device by sig\n");
> @@ -1176,8 +1179,8 @@ unsigned int ata_dev_classify(const struct ata_taskfile *tf)
> }
>
> if ((tf->lbam == 0x3c) && (tf->lbah == 0xc3)) {
> - printk(KERN_INFO "ata: SEMB device ignored\n");
> - return ATA_DEV_SEMB_UNSUP; /* not yet */
> + DPRINTK("found SEMB device by sig (could be ATA device)\n");
> + return ATA_DEV_SEMB;
> }
>
> DPRINTK("unknown device\n");
> @@ -2004,6 +2007,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
> struct ata_taskfile tf;
> unsigned int err_mask = 0;
> const char *reason;
> + bool is_semb = class == ATA_DEV_SEMB;
> int may_fallback = 1, tried_spinup = 0;
> int rc;
>
> @@ -2014,6 +2018,8 @@ retry:
> ata_tf_init(dev, &tf);
>
> switch (class) {
> + case ATA_DEV_SEMB:
> + class = ATA_DEV_ATA; /* some hard drives report SEMB sig */
> case ATA_DEV_ATA:
> tf.command = ATA_CMD_ID_ATA;
> break;
> @@ -2050,6 +2056,14 @@ retry:
> return -ENOENT;
> }
>
> + if (is_semb) {
> + ata_dev_printk(dev, KERN_INFO, "IDENTIFY failed on "
> + "device w/ SEMB sig, disabled\n");
> + /* SEMB is not supported yet */
> + *p_class = ATA_DEV_SEMB_UNSUP;
> + return 0;
> + }
> +
> if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
> /* Device or controller might have reported
> * the wrong device class. Give a shot at the
--
When all other means of communication fail, try words!
More information about the kernel-team
mailing list