public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* kernel cant access SATA adapter device
@ 2013-10-16 19:46 Robert Story
  2013-10-17 15:59 ` taco
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Story @ 2013-10-16 19:46 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org

Hi,

I've got a SATA adapter for a SD card in a Dell Poweredge R610. The BIOS
can see and boot the sdcard, (to Windows, or using syslinux/extlinux), but
when it hands over control to the Linux kernel, the kernel cannot access it.

Here's an excerpt from dmesg:

scsi 0:0:2:0: Direct-Access     ATA      FC-1307 SD to CF 1.1  PQ: 0 ANSI: 5
sd 0:0:2:0: Attached scsi generic sg3 type 0
mptsas: ioc0: mptsas_free_fw_event: kfree (fw_event=0xffff8801ab1ad8c0)
sd 0:0:2:0: [sdc] Spinning up disk .....................not responding...
sd 0:0:2:0: [sdc] READ CAPACITY(16) failed
sd 0:0:2:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 0:0:2:0: [sdc] Sense Key : Not Ready [current]
sd 0:0:2:0: [sdc] Add. Sense: Logical unit not ready, initializing command required
sd 0:0:2:0: [sdc] READ CAPACITY failed
sd 0:0:2:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 0:0:2:0: [sdc] Sense Key : Not Ready [current]
sd 0:0:2:0: [sdc] Add. Sense: Logical unit not ready, initializing command required
sd 0:0:2:0: [sdc] Test WP failed, assume Write Enabled
sd 0:0:2:0: [sdc] Asking for cache data failed
sd 0:0:2:0: [sdc] Assuming drive cache: write through

After booting and running 'sdparm --command=start /dev/sdc' I can get a
read capacity to work, but cannot access the drive (e.g. fdisk -l /dev/sdc).

If I put the SD card in a USB adapter, it works, and I was able to access
the SD card via the SD adapter in another machine. But our production
machines are dell's, so I really want to get it working there.

I've attached more complete debug info from booting and existing CentOS 6.4
install with the card installed, and a rdsosreport from an attempt to boot
Fedora 20 Alpha.

Any help or suggestions greatly appreciated.


Robert

--
Senior Software Engineer
Parsons Government Services , National Security & Defense Division

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-16 19:46 kernel cant access SATA adapter device Robert Story
@ 2013-10-17 15:59 ` taco
  2013-10-17 17:02   ` Robert Story
  0 siblings, 1 reply; 7+ messages in thread
From: taco @ 2013-10-17 15:59 UTC (permalink / raw)
  To: Robert Story; +Cc: linux-scsi@vger.kernel.org

What is the version of mptsas driver?

It seems that the mptsas's driver can't recognize the the type of SD
card and treat it as normal hard disk drive.

On Wed, Oct 16, 2013 at 03:46:51PM -0400, Robert Story wrote:
> Hi,
> 
> I've got a SATA adapter for a SD card in a Dell Poweredge R610. The BIOS
> can see and boot the sdcard, (to Windows, or using syslinux/extlinux), but
> when it hands over control to the Linux kernel, the kernel cannot access it.
> 
> Here's an excerpt from dmesg:
> 
> scsi 0:0:2:0: Direct-Access     ATA      FC-1307 SD to CF 1.1  PQ: 0 ANSI: 5
> sd 0:0:2:0: Attached scsi generic sg3 type 0
> mptsas: ioc0: mptsas_free_fw_event: kfree (fw_event=0xffff8801ab1ad8c0)
> sd 0:0:2:0: [sdc] Spinning up disk .....................not responding...
> sd 0:0:2:0: [sdc] READ CAPACITY(16) failed
> sd 0:0:2:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> sd 0:0:2:0: [sdc] Sense Key : Not Ready [current]
> sd 0:0:2:0: [sdc] Add. Sense: Logical unit not ready, initializing command required
> sd 0:0:2:0: [sdc] READ CAPACITY failed
> sd 0:0:2:0: [sdc] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
> sd 0:0:2:0: [sdc] Sense Key : Not Ready [current]
> sd 0:0:2:0: [sdc] Add. Sense: Logical unit not ready, initializing command required
> sd 0:0:2:0: [sdc] Test WP failed, assume Write Enabled
> sd 0:0:2:0: [sdc] Asking for cache data failed
> sd 0:0:2:0: [sdc] Assuming drive cache: write through
> 
> After booting and running 'sdparm --command=start /dev/sdc' I can get a
> read capacity to work, but cannot access the drive (e.g. fdisk -l /dev/sdc).
> 
> If I put the SD card in a USB adapter, it works, and I was able to access
> the SD card via the SD adapter in another machine. But our production
> machines are dell's, so I really want to get it working there.
> 
> I've attached more complete debug info from booting and existing CentOS 6.4
> install with the card installed, and a rdsosreport from an attempt to boot
> Fedora 20 Alpha.
> 
> Any help or suggestions greatly appreciated.
> 
> 
> Robert
> 
> --
> Senior Software Engineer
> Parsons Government Services , National Security & Defense Division
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-17 15:59 ` taco
@ 2013-10-17 17:02   ` Robert Story
  2013-10-18 14:37     ` taco
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Story @ 2013-10-17 17:02 UTC (permalink / raw)
  To: taco; +Cc: linux-scsi@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

On Thu, 17 Oct 2013 23:59:24 +0800 taco wrote:
T> What is the version of mptsas driver?

modinfo mptsas reports verion 3.04.20. Kernel is 2.6.32-358 (RHEL 6.3).

T> It seems that the mptsas's driver can't recognize the the type of SD
T> card and treat it as normal hard disk drive.

Ok. So how would I figure out what mptsas is looking at to determine how to
treat it? Or is there some kernel param I can pass that says sda=sdcard or
soemthing?


Robert

--
Senior Software Engineer
Parsons Government Services , National Security & Defense Division

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-17 17:02   ` Robert Story
@ 2013-10-18 14:37     ` taco
  2013-10-18 18:53       ` Robert Story
  0 siblings, 1 reply; 7+ messages in thread
From: taco @ 2013-10-18 14:37 UTC (permalink / raw)
  To: Robert Story; +Cc: linux-scsi@vger.kernel.org


reproduce the problem with more debug messages with the bellow
command:

$ echo 0x2FFFF > /sys/modules/mptsas/mpt_debug_level

and attach it here


On Thu, Oct 17, 2013 at 01:02:49PM -0400, Robert Story wrote:
> On Thu, 17 Oct 2013 23:59:24 +0800 taco wrote:
> T> What is the version of mptsas driver?
> 
> modinfo mptsas reports verion 3.04.20. Kernel is 2.6.32-358 (RHEL 6.3).
> 
> T> It seems that the mptsas's driver can't recognize the the type of SD
> T> card and treat it as normal hard disk drive.
> 
> Ok. So how would I figure out what mptsas is looking at to determine how to
> treat it? Or is there some kernel param I can pass that says sda=sdcard or
> soemthing?
> 
> 
> Robert
> 
> --
> Senior Software Engineer
> Parsons Government Services , National Security & Defense Division



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-18 14:37     ` taco
@ 2013-10-18 18:53       ` Robert Story
  2013-10-23 16:09         ` taco
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Story @ 2013-10-18 18:53 UTC (permalink / raw)
  To: taco; +Cc: linux-scsi@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

On Fri, 18 Oct 2013 22:37:45 +0800 taco wrote:
T> 
T> reproduce the problem with more debug messages with the bellow
T> command:
T> 
T> $ echo 0x2FFFF > /sys/modules/mptsas/mpt_debug_level
T> 
T> and attach it here

The dmesg buffer wrapped, and it was close to 500k. That's a bit big for
sending to the whole list, so I put it and the syslog output on my
webserver:

   http://futz.org/users/linux-scsi/mpt.messages
   http://futz.org/users/linux-scsi/mpt.dmesg 


Robert

--
Senior Software Engineer
Parsons Government Services , National Security & Defense Division

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-18 18:53       ` Robert Story
@ 2013-10-23 16:09         ` taco
  2013-10-23 16:23           ` Robert Story
  0 siblings, 1 reply; 7+ messages in thread
From: taco @ 2013-10-23 16:09 UTC (permalink / raw)
  To: Robert Story; +Cc: linux-scsi@vger.kernel.org

Sense key [02 04 02] means LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED

it works on windows but not on linux?

On Fri, Oct 18, 2013 at 02:53:21PM -0400, Robert Story wrote:
> On Fri, 18 Oct 2013 22:37:45 +0800 taco wrote:
> T> 
> T> reproduce the problem with more debug messages with the bellow
> T> command:
> T> 
> T> $ echo 0x2FFFF > /sys/modules/mptsas/mpt_debug_level
> T> 
> T> and attach it here
> 
> The dmesg buffer wrapped, and it was close to 500k. That's a bit big for
> sending to the whole list, so I put it and the syslog output on my
> webserver:
> 
>    http://futz.org/users/linux-scsi/mpt.messages
>    http://futz.org/users/linux-scsi/mpt.dmesg 
> 
> 
> Robert
> 
> --
> Senior Software Engineer
> Parsons Government Services , National Security & Defense Division



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel cant access SATA adapter device
  2013-10-23 16:09         ` taco
@ 2013-10-23 16:23           ` Robert Story
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Story @ 2013-10-23 16:23 UTC (permalink / raw)
  To: taco; +Cc: linux-scsi@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Thu, 24 Oct 2013 00:09:17 +0800 taco wrote:
T> Sense key [02 04 02] means LOGICAL UNIT NOT READY, INITIALIZING COMMAND
T> REQUIRED
T> 
T> it works on windows but not on linux?

Yes, according to my coworker, Windows Embedded boots fine. And the
system boots via the card, with syslinux loading the kernel/initrd from the
card, so I don't know why it wouldn't be ready.

As I mentioned before, 'sdparm --command=capacity /dev/sda' initially
fails, but will succeed after 'sdparm --command=start /dev/sda'. However,
even though capacity works after the start command, attempts to access the
card continue to fail (e.g fdisk -l /dev/sda).


Robert

--
Senior Software Engineer
Parsons Government Services , National Security & Defense Division

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-23 16:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 19:46 kernel cant access SATA adapter device Robert Story
2013-10-17 15:59 ` taco
2013-10-17 17:02   ` Robert Story
2013-10-18 14:37     ` taco
2013-10-18 18:53       ` Robert Story
2013-10-23 16:09         ` taco
2013-10-23 16:23           ` Robert Story

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox