Re: kernel cant access SATA adapter device

2013-10-23 Thread taco
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 0x2  /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


--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel cant access SATA adapter device

2013-10-18 Thread taco

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

$ echo 0x2  /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


--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel cant access SATA adapter device

2013-10-17 Thread taco
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=0x8801ab1ad8c0)
 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 majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch,v2 05/10] sd: use alloc_disk_node

2012-11-05 Thread taco

On 11/05/2012 10:57 PM, Bart Van Assche wrote:

On 11/05/12 15:12, Jeff Moyer wrote:

Bart Van Assche bvanass...@acm.org writes:


On 11/02/12 22:45, Jeff Moyer wrote:

Signed-off-by: Jeff Moyer jmo...@redhat.com
---
   drivers/scsi/sd.c |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12f6fdf..8deb915 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2714,7 +2714,7 @@ static int sd_probe(struct device *dev)
   if (!sdkp)
   goto out;

-gd = alloc_disk(SD_MINORS);
+gd = alloc_disk_node(SD_MINORS, dev_to_node(dev));
   if (!gd)
   goto out_free;


shost-numa_node can be another NUMA node than dev_to_node(dev). Have
you considered using shost-numa_node here ?


It can?  How?


E.g. if the LLD allows the user to specify the value of numa_node and 
passes that value to scsi_host_alloc_node() (see also 
http://lkml.org/lkml/2012/10/23/477 for further information).



Just so I'm clear, you're suggesting I use the scsi_device's host
pointer to get to the Scsi_Host, and that *will* be filled in that this
point, right?


As far as I can see the sdev-host pointer is set in scsi_alloc_sdev() 
and that happens before sd_probe() is invoked.



yes, struct scsi_device was created before sd, sd is the top layer.

Bart.

--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html