Re: e-SATA ExpressCard - OOPS plus incrementing "ataX" on Linux-2.6.xx

From: Jeff Chua
Date: Tue Jun 15 2010 - 08:08:34 EST


On Tue, Jun 15, 2010 at 7:49 AM, Robert Hancock <hancockrwd@xxxxxxxxx> wrote:

> The ataX number incrementing is normal (it always increments when an ATA
> host is initialized, it doesn't appear the numbers get reused). The other
> messages are the expected result when you surprise-remove the card. I think
> there should be a way to trigger the hotplug code to disable the device
> before you eject it, but I'm not sure what that is supposed to be - maybe
> echo 1 to /sys/device/pci_somethingorother/remove ?

Robert,

Thanks for the pointer. I found this "remove" is in
/sys/bus/pci/devices/0000:05:00.0/remove

# echo 1 >/sys/bus/pci/devices/0000:05:00.0/remove

ata14.00: disabled
sd 17:0:0:0: [sdb] Synchronizing SCSI cache
sd 17:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
sd 17:0:0:0: [sdb] Stopping disk
sd 17:0:0:0: [sdb] START_STOP FAILED
sd 17:0:0:0: [sdb] Result: hostbyte=0x04 driverbyte=0x00
ahci 0000:05:00.0: PCI INT A disabled


It's getter better. Next is to really shutdown the "sdb" hard disk. Is
that possible? Would be nice to make the "sd 17:0:0:0: [sdb]
START_STOP FAILED" go away gracefully. Any command to do that?


On Tue, Jun 15, 2010 at 9:26 AM, Jeff Garzik <jeff@xxxxxxxxxx> wrote:

> The incrementing of ataX is unrelated to anything else... Each "new" ata interface gets a new id.

Jeff,

With the "remove" command working, it'll be nice to make "ahci"
_reuse_ the interface now that it's removed cleanly. I'm just afaid
that each time the card is removed and reinserted, the ataXX interface
kept incrementing and will eventually does harm to the kernel?


> "failed to stop engine" is where the driver is attempting to talk to the card, and gracefully shut things down. > If the card does not exist (ie. has been removed/ejected), then this is normal behavior.

Ok, that's fixed with "echo 1 >/sys/bus/pci/devices/0000:05:00.0/remove".



Thanks,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/