Bug 20712
Summary: | mpt2sas and SATA drives | ||
---|---|---|---|
Product: | SCSI Drivers | Reporter: | David Zeuthen (zeuthen) |
Component: | Other | Assignee: | scsi_drivers-other |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.34.7-56.fc13.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
David Zeuthen
2010-10-18 19:37:51 UTC
(In reply to comment #0) > Occasionally /lib/udev/ata_id fails with EINVAL (see details below) Actually I read it wrong. It's the SG_DXFER_FROM_DEV ioctl that is causing the problem. Here's the strace output from a failed run ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[12]=[a1, 08, 2e, 00, 01, 00, 00, 00, 00, ec, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=2000, flags=0, data[512]=["\x7a\x42\xff\x3f\x37\xc8\x10\x00\x00\x00\x00\x00\x3f \x00\x00\x00\x00\x00\x00\x00\x20\x20\x20\x20\x57\x20\x2d\x44\x43 \x57\x57\x41\x30\x33\x33\x30\x37\x39\x31\x34\x00\x00\x00\x00\x32 \x00\x31\x30\x30\x2e\x56\x31\x31\x30\x44\x57\x20\x43\x44\x57\x30 \x31\x32\x30\x41\x46\x58\x45\x30\x2d\x59\x30\x41\x39\x20\x30\x20 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 \x20\x10\x80\x00\x00\x00\x2f\x01\x40\x00\x00\x00\x00\x07\x00\xff \x3f\x10\x00\x3f\x00\x10\xfc\xfb\x00\x00\x01\xff\xff\xff\x0f\x00 \x00\x07\x00\x03\x00\x78\x00\x78\x00\x78\x00\x78\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x06\x17\x00\x00\x44 \x00\x40\x00\xfe\x01\x00\x00\x6b\x74\x61\x77\x23\x41\x69\x74\x41 \xb4\x23\x41\x7f\x40\x51\x00\x51\x00\x00\x00\xfe\xff\x00\x00\xfe \x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x6d\x70\x74\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x50\xe2\x4e\x4e \xaf\x11\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x18\x40\x18\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x16\xe6 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00"], status=00, masked_status=00, sb[0]=[], host_status=0x8, driver_status=0, resid=0, duration=1378, info=0x1}) = 0 and here it is from a successful run ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[12]=[a1, 08, 2e, 00, 01, 00, 00, 00, 00, ec, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=2000, flags=0, data[512]=["\x7a\x42\xff\x3f\x37\xc8\x10\x00\x00\x00\x00\x00\x3f \x00\x00\x00\x00\x00\x00\x00\x20\x20\x20\x20\x57\x20\x2d\x44\x43 \x57\x57\x41\x30\x33\x33\x30\x37\x39\x31\x34\x00\x00\x00\x00\x32 \x00\x31\x30\x30\x2e\x56\x31\x31\x30\x44\x57\x20\x43\x44\x57\x30 \x31\x32\x30\x41\x46\x58\x45\x30\x2d\x59\x30\x41\x39\x20\x30\x20 \x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20 \x20\x10\x80\x00\x00\x00\x2f\x01\x40\x00\x00\x00\x00\x07\x00\xff \x3f\x10\x00\x3f\x00\x10\xfc\xfb\x00\x00\x01\xff\xff\xff\x0f\x00 \x00\x07\x00\x03\x00\x78\x00\x78\x00\x78\x00\x78\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x06\x17\x00\x00\x44 \x00\x40\x00\xfe\x01\x00\x00\x6b\x74\x61\x77\x23\x41\x69\x74\x41 \xb4\x23\x41\x7f\x40\x51\x00\x51\x00\x00\x00\xfe\xff\x00\x00\xfe \x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb0\x6d\x70\x74\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x50\xe2\x4e\x4e \xaf\x11\x86\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x18\x40\x18\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x16\xe6 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35 \x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e \x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x10\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\xa5\x8e"], status=02, masked_status=01, sb[22]=[72, 01, 00, 1d, 00, 00, 00, 0e, 09, 0c, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=0, duration=142, info=0x1}) = 0 and here's the diff \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x35 +\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e +\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 +\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x10\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 -\x00\x00\x00"], -status=00, masked_status=00, sb[0]=[], -host_status=0x8, driver_status=0, resid=0, duration=1378, info=0x1}) = 0 +\x00\xa5\x8e"], +status=02, masked_status=01, +sb[22]=[72, 01, 00, 1d, 00, 00, 00, 0e, 09, 0c, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00], +host_status=0, driver_status=0x8, resid=0, duration=142, info=0x1}) = 0 (In reply to comment #1) > timeout=2000, Btw, bumping the timeout doesn't fix the problem (bumping the timeout from 2000ms would probably be a good idea regardless). We could retry sending the command.. but my understanding is that we shouldn't have to do this, right? Thanks for any insight. (In reply to comment #2) > Oct 18 15:25:55 rhea kernel: mpt2sas0: LSISAS2116: FWVersion(03.00.00.00), ChipRevision(0x01), BiosVersion(07.01.00.00) OK, inspired by James' reply here http://www.spinics.net/lists/linux-scsi/msg42367.html specifically So this is likely a firmware bug inside the mpt2sas. All of the mpt cards use a fat firmware model meaning they take in pure SCSI commands and do the translation to SATA if necessary all within the firmware, so the first step would be to make sure your card has the latest firmware. I've updated the card to the latest firmware Oct 19 14:11:45 rhea kernel: mpt2sas0: LSISAS2116: FWVersion(07.00.00.00), ChipRevision(0x01), BiosVersion(07.01.00.00) e.g. from version 03.00.00.00 to version 07.00.00.00 and suddenly all the problems go away. So I'm closing this bug. (And I also note that there's a lot of low-hanging fruit here - we really should make it easy for users to a) know that there is a firmware update; b) make it easy update the firmware... could maybe do this in the udisks/palimpsest stack -maybe start by just support a couple of vendors. I don't know.) |