Re: state of the osdblk driver?

2014-10-21 Thread Jeff Garzik
On Tue, Oct 21, 2014 at 8:47 AM, Boaz Harrosh  wrote:
> [Just that I thought we don't do that. I can show you a dozen
>  ISA scsi LLD controllers which are a complete pain in the neck
>  with a all subsection core support. There is not a single system
>  on the planet that has this even possible, yet we do not remove
>  them nor the ISA bus crap. osdblk at least is a SW only exercise
>  that can be very much valid in any system.


+1 also a fair point.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: state of the osdblk driver?

2014-10-21 Thread Jeff Garzik
Drop it, if there are no users.

It was simulating an OSD, but there did not seem to be much beyond
academic interest, and some interest in the use of aforementioned
block functions as a useful exercise in block driver writing.


On Tue, Oct 21, 2014 at 8:06 AM, Christoph Hellwig  wrote:
> The osdblk driver hsa seen literally no change except for global
> API changes since it was merged, and I've never heard of a user.
>
> Is this something we want to keep around?  I just noticed it because
> it's the only non-SCSI user of some of the old block layer tagging
> functions.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: state of the osdblk driver?

2014-10-21 Thread Jeff Garzik
Drop it, if there are no users.

It was simulating an OSD, but there did not seem to be much beyond
academic interest, and some interest in the use of aforementioned
block functions as a useful exercise in block driver writing.


On Tue, Oct 21, 2014 at 8:06 AM, Christoph Hellwig h...@infradead.org wrote:
 The osdblk driver hsa seen literally no change except for global
 API changes since it was merged, and I've never heard of a user.

 Is this something we want to keep around?  I just noticed it because
 it's the only non-SCSI user of some of the old block layer tagging
 functions.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: state of the osdblk driver?

2014-10-21 Thread Jeff Garzik
On Tue, Oct 21, 2014 at 8:47 AM, Boaz Harrosh o...@electrozaur.com wrote:
 [Just that I thought we don't do that. I can show you a dozen
  ISA scsi LLD controllers which are a complete pain in the neck
  with a all subsection core support. There is not a single system
  on the planet that has this even possible, yet we do not remove
  them nor the ISA bus crap. osdblk at least is a SW only exercise
  that can be very much valid in any system.


+1 also a fair point.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: TPMs and random numbers

2013-09-12 Thread Jeff Garzik
On Thu, Sep 12, 2013 at 5:57 PM, Jörn Engel  wrote:
> On Wed, 11 September 2013 14:47:04 -0400, David Safford wrote:
>> But I also think that the existing (certified) TPMs are good enough
>> for direct use.

> That is equivalent to trusting the TPM chip not to be malicious.  It

Indeed.  While it need not be rngd or userland at all, it seems
reasonable to require any hardware RNG to have its data pushed through
AES mix steps (as kernel random does now IIUC).

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


Re: TPMs and random numbers

2013-09-12 Thread Jeff Garzik
On Thu, Sep 12, 2013 at 5:57 PM, Jörn Engel jo...@logfs.org wrote:
 On Wed, 11 September 2013 14:47:04 -0400, David Safford wrote:
 But I also think that the existing (certified) TPMs are good enough
 for direct use.

 That is equivalent to trusting the TPM chip not to be malicious.  It

Indeed.  While it need not be rngd or userland at all, it seems
reasonable to require any hardware RNG to have its data pushed through
AES mix steps (as kernel random does now IIUC).

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


Re: TPMs and random numbers

2013-09-11 Thread Jeff Garzik
On Wed, Sep 11, 2013 at 2:45 PM, Theodore Ts'o  wrote:
> We should definitely do this.  If the TPM driver could fetch some
> randomness and then call add_device_randomness() to feed this into the
> random driver's entropy pool when it initializes itself, that would be
> ***really*** cool.


rngd already does this.

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


Re: TPMs and random numbers

2013-09-11 Thread Jeff Garzik
On Wed, Sep 11, 2013 at 2:45 PM, Theodore Ts'o ty...@mit.edu wrote:
 We should definitely do this.  If the TPM driver could fetch some
 randomness and then call add_device_randomness() to feed this into the
 random driver's entropy pool when it initializes itself, that would be
 ***really*** cool.


rngd already does this.

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


Re: [PATCH libata/for-3.10-fixes] libata: update "Maintained by:" tags

2013-05-14 Thread Jeff Garzik
On Tue, May 14, 2013 at 2:15 PM, Tejun Heo  wrote:
> (Removed Linus from cc)
>
> The following patch has been applied to libata/for-3.10-fixes.  Will
> push out to Linus with the next batch of updates.
>
> Thanks!
>
> From 8c3d3d4b12bf8de8c59fe1eb1bf866a8676ca309 Mon Sep 17 00:00:00 2001
> From: Tejun Heo 
> Date: Tue, 14 May 2013 11:09:50 -0700
>
> Jeff moved on to a greener pasture.


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


Re: [PATCH libata/for-3.10-fixes] libata: update Maintained by: tags

2013-05-14 Thread Jeff Garzik
On Tue, May 14, 2013 at 2:15 PM, Tejun Heo t...@kernel.org wrote:
 (Removed Linus from cc)

 The following patch has been applied to libata/for-3.10-fixes.  Will
 push out to Linus with the next batch of updates.

 Thanks!

 From 8c3d3d4b12bf8de8c59fe1eb1bf866a8676ca309 Mon Sep 17 00:00:00 2001
 From: Tejun Heo t...@kernel.org
 Date: Tue, 14 May 2013 11:09:50 -0700

 Jeff moved on to a greener pasture.


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


Re: [GIT PULL] libata maintainership update

2013-05-07 Thread Jeff Garzik

On 05/07/2013 01:19 PM, Tejun Heo wrote:

Hello, Linus, Jeff, linux-ide folks.

As discussed earlier, Jeff is leaving for something more fun and I'm
inheriting the maintainership of libata.  Please pull from the
following branch to receive MAINTAINERS update.

   git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git for-3.10

I'll manage it similarly to other trees I'm maintaining.  When X-rc1
drops, for-X-fixes and for-X+1 are created on top of it and for-next
will be pulling in both branches.

Thanks!

--
tejun


Tejun Heo (1):
   libata: change maintainer

  MAINTAINERS | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e1f5fac..c5ed056 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7140,7 +7140,7 @@ F:drivers/misc/phantom.c
  F:include/uapi/linux/phantom.h

  SERIAL ATA (SATA) SUBSYSTEM
-M: Jeff Garzik 
+M: Tejun Heo 
  L:linux-...@vger.kernel.org
  T:git git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
  S:Supported


You probably also want to change

* the git tree URL quoted above
* a ton of source files themselves say "maintained by Jeff Garzik and 
linux-ide"




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


Re: [GIT PULL] libata maintainership update

2013-05-07 Thread Jeff Garzik

On 05/07/2013 01:19 PM, Tejun Heo wrote:

Hello, Linus, Jeff, linux-ide folks.

As discussed earlier, Jeff is leaving for something more fun and I'm
inheriting the maintainership of libata.  Please pull from the
following branch to receive MAINTAINERS update.

   git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git for-3.10

I'll manage it similarly to other trees I'm maintaining.  When X-rc1
drops, for-X-fixes and for-X+1 are created on top of it and for-next
will be pulling in both branches.

Thanks!

--
tejun


Tejun Heo (1):
   libata: change maintainer

  MAINTAINERS | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e1f5fac..c5ed056 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7140,7 +7140,7 @@ F:drivers/misc/phantom.c
  F:include/uapi/linux/phantom.h

  SERIAL ATA (SATA) SUBSYSTEM
-M: Jeff Garzik jgar...@pobox.com
+M: Tejun Heo t...@kernel.org
  L:linux-...@vger.kernel.org
  T:git git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
  S:Supported


You probably also want to change

* the git tree URL quoted above
* a ton of source files themselves say maintained by Jeff Garzik and 
linux-ide




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


libata maintainership change

2013-05-03 Thread Jeff Garzik


Linux has really found its groove.

When I first got involved in Linux, there was no PCI API (now called the 
hotplug or device API), and patch submission was a moderately painful 
process of throwing spaghetti at a wall: sending and resending, with 
both Linus and maintainers having to manually resolve merge conflicts. 



It was a real fight to get any Linux hardware support at all.  The vast 
amount of hardware documentation was locked away or simply unavailable.


Working on memory management or filesystems or scheduling was always the 
Sexy Rock Star PhD work that attracted engineers.  OTOH, I felt, device 
drivers were ignored as boring, unsexy grunt work.  Which, ok, maybe it 
was.  Each new device driver, though, spread Linux to more and greater 
locales.  Alan Cox and Don Becker did enormous heavy lifting back then. 
 Now Linux is where it is today, with most hardware vendors actively 
seeking open source driver support (except NVIDIA, natch).  The kernel 
has come a long way.


Time for new open source pastures outside the kernel, for me.  SATA is 
slowly getting unexciting to the world.  Which, really, just means the 
brand new technology has reached a usable plateau.  :)  And maybe in a 
few years, with directly attached PCI-NextGenSuperFastExpress storage, 
ATA and SCSI will be distant memories.


Until such time as block-based storage disappears from this earth, the 
brave Sir Tejun, basically the libata co-author at this point, has 
agreed to be a target for slings and arrows known as libata patches.


All the best,

Jeff


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


libata maintainership change

2013-05-03 Thread Jeff Garzik


Linux has really found its groove.

When I first got involved in Linux, there was no PCI API (now called the 
hotplug or device API), and patch submission was a moderately painful 
process of throwing spaghetti at a wall: sending and resending, with 
both Linus and maintainers having to manually resolve merge conflicts. 
shiver


It was a real fight to get any Linux hardware support at all.  The vast 
amount of hardware documentation was locked away or simply unavailable.


Working on memory management or filesystems or scheduling was always the 
Sexy Rock Star PhD work that attracted engineers.  OTOH, I felt, device 
drivers were ignored as boring, unsexy grunt work.  Which, ok, maybe it 
was.  Each new device driver, though, spread Linux to more and greater 
locales.  Alan Cox and Don Becker did enormous heavy lifting back then. 
 Now Linux is where it is today, with most hardware vendors actively 
seeking open source driver support (except NVIDIA, natch).  The kernel 
has come a long way.


Time for new open source pastures outside the kernel, for me.  SATA is 
slowly getting unexciting to the world.  Which, really, just means the 
brand new technology has reached a usable plateau.  :)  And maybe in a 
few years, with directly attached PCI-NextGenSuperFastExpress storage, 
ATA and SCSI will be distant memories.


Until such time as block-based storage disappears from this earth, the 
brave Sir Tejun, basically the libata co-author at this point, has 
agreed to be a target for slings and arrows known as libata patches.


All the best,

Jeff


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


Re: [PATCH] sata_highbank: Rename proc_name to the module name

2013-04-30 Thread Jeff Garzik

On 04/30/2013 12:57 PM, Robert Richter wrote:

From: Robert Richter 

mkinitrd looks at /sys/class/scsi_host/host$hostnum/proc_name to find
the module name of a disk driver. Current name is "highbank-ahci" but
the module is "sata_highbank". Rename it to match the module name.

Cc: Rob Herring 
Cc: Alexander Graf 
Cc:  v3.7..
Signed-off-by: Robert Richter 
---
  drivers/ata/sata_highbank.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied



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


[git patches] libata updates

2013-04-30 Thread Jeff Garzik

Summary:

1) More ACPI fixes, cleanups

2) Minor cleanups for sata_highbank, pata_at32, pata_octeon_cf,
   sata_rcar

3) pata_legacy: small bug found in opti chipset code (untested fix,
   due to ancient h/w)

4) sata_fsl: RX water mark config knob, some h/w needs it

5) pata_imx: cleanups, DeviceTree support

6) SCSI<->ATA translator: properly export translator version,
   not device firmware version


Please pull 2cc1144a31f76d4a9fb48bec5d6ba1359f980813 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

Aaron Lu (2):
  libata-acpi: remove redundent code for power resource handling
  [libata] acpi: make ata_ap_acpi_handle not block

Alexandru Gheorghiu (1):
  pata_octeon_cf: Use resource_size function

Baruch Even (1):
  [libata] SCSI: really use SATL version in VPD

Dan Carpenter (1):
  pata_legacy: bogus clock in opti82c46x_set_piomode()

Jingoo Han (2):
  pata_at32: use module_platform_driver_probe()
  sata_highbank: make ahci_highbank_pm_ops static

Lv Zheng (1):
  ACPI/libata: Restore libata.noacpi support

Qiang Liu (1):
  fsl/sata: create a sysfs entry for rx water mark

Robert Richter (1):
  sata_highbank: Rename proc_name to the module name

Sachin Kamat (1):
  sata_rcar: Convert to devm_ioremap_resource()

Sascha Hauer (4):
  pata_imx: Use devm_clk_get
  pata_imx: cleanup error path
  pata_imx: use void __iomem * for regs
  pata_imx: add devicetree support

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


Re: [PATCH] AHCI: Make distinct names for ports in /proc/interrupts

2013-04-30 Thread Jeff Garzik

On 04/29/2013 06:12 AM, Alexander Gordeev wrote:

Currently all interrupts assigned to AHCI ports show up in
'/proc/interrupts' as 'ahci'. This fix adds port numbers as
suffixes and hence makes the descriptions distinct.

Reported-by: Jan Beulich 
Signed-off-by: Alexander Gordeev 
---
  drivers/ata/ahci.c |6 --
  drivers/ata/ahci.h |1 +
  2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 3b9a7b1..dc5c1aa 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1146,10 +1146,12 @@ int ahci_host_activate(struct ata_host *host, int irq, 
unsigned int n_msis,
return -EINVAL;

for (i = 0; i < n_irqs; i++) {
+   struct ahci_port_priv *pp = 
host->ports[i]->private_data;
+   snprintf(pp->irq_desc, sizeof(pp->irq_desc),
+"%s%d", dev_driver_string(host->dev), i);
rc = devm_request_threaded_irq(host->dev, irq + i,
ahci_multi_irqs_intr, ahci_port_thread_fn,
-   IRQF_SHARED, dev_driver_string(host->dev),
-   host->ports[i]);
+   IRQF_SHARED, pp->irq_desc, host->ports[i]);
if (rc)
goto out_free_irqs;
}
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index ed1fbc8..ceb5208 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -305,6 +305,7 @@ struct ahci_port_priv {
int fbs_last_dev;   /* save FBS.DEV of last FIS */
/* enclosure management info per PM slot */
struct ahci_em_priv em_priv[EM_MAX_SLOTS];
+   charirq_desc[8];/* bus + port # */


Would prefer to initialize irq_desc when the struct of ahci_port_priv is 
initialized, rather than at irq request time.


Jeff




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


Re: [PATCH] AHCI: Make distinct names for ports in /proc/interrupts

2013-04-30 Thread Jeff Garzik

On 04/29/2013 06:12 AM, Alexander Gordeev wrote:

Currently all interrupts assigned to AHCI ports show up in
'/proc/interrupts' as 'ahci'. This fix adds port numbers as
suffixes and hence makes the descriptions distinct.

Reported-by: Jan Beulich jbeul...@suse.com
Signed-off-by: Alexander Gordeev agord...@redhat.com
---
  drivers/ata/ahci.c |6 --
  drivers/ata/ahci.h |1 +
  2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 3b9a7b1..dc5c1aa 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1146,10 +1146,12 @@ int ahci_host_activate(struct ata_host *host, int irq, 
unsigned int n_msis,
return -EINVAL;

for (i = 0; i  n_irqs; i++) {
+   struct ahci_port_priv *pp = 
host-ports[i]-private_data;
+   snprintf(pp-irq_desc, sizeof(pp-irq_desc),
+%s%d, dev_driver_string(host-dev), i);
rc = devm_request_threaded_irq(host-dev, irq + i,
ahci_multi_irqs_intr, ahci_port_thread_fn,
-   IRQF_SHARED, dev_driver_string(host-dev),
-   host-ports[i]);
+   IRQF_SHARED, pp-irq_desc, host-ports[i]);
if (rc)
goto out_free_irqs;
}
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index ed1fbc8..ceb5208 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -305,6 +305,7 @@ struct ahci_port_priv {
int fbs_last_dev;   /* save FBS.DEV of last FIS */
/* enclosure management info per PM slot */
struct ahci_em_priv em_priv[EM_MAX_SLOTS];
+   charirq_desc[8];/* bus + port # */


Would prefer to initialize irq_desc when the struct of ahci_port_priv is 
initialized, rather than at irq request time.


Jeff




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


[git patches] libata updates

2013-04-30 Thread Jeff Garzik

Summary:

1) More ACPI fixes, cleanups

2) Minor cleanups for sata_highbank, pata_at32, pata_octeon_cf,
   sata_rcar

3) pata_legacy: small bug found in opti chipset code (untested fix,
   due to ancient h/w)

4) sata_fsl: RX water mark config knob, some h/w needs it

5) pata_imx: cleanups, DeviceTree support

6) SCSI-ATA translator: properly export translator version,
   not device firmware version


Please pull 2cc1144a31f76d4a9fb48bec5d6ba1359f980813 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

Aaron Lu (2):
  libata-acpi: remove redundent code for power resource handling
  [libata] acpi: make ata_ap_acpi_handle not block

Alexandru Gheorghiu (1):
  pata_octeon_cf: Use resource_size function

Baruch Even (1):
  [libata] SCSI: really use SATL version in VPD

Dan Carpenter (1):
  pata_legacy: bogus clock in opti82c46x_set_piomode()

Jingoo Han (2):
  pata_at32: use module_platform_driver_probe()
  sata_highbank: make ahci_highbank_pm_ops static

Lv Zheng (1):
  ACPI/libata: Restore libata.noacpi support

Qiang Liu (1):
  fsl/sata: create a sysfs entry for rx water mark

Robert Richter (1):
  sata_highbank: Rename proc_name to the module name

Sachin Kamat (1):
  sata_rcar: Convert to devm_ioremap_resource()

Sascha Hauer (4):
  pata_imx: Use devm_clk_get
  pata_imx: cleanup error path
  pata_imx: use void __iomem * for regs
  pata_imx: add devicetree support

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


Re: [PATCH] sata_highbank: Rename proc_name to the module name

2013-04-30 Thread Jeff Garzik

On 04/30/2013 12:57 PM, Robert Richter wrote:

From: Robert Richter robert.rich...@calxeda.com

mkinitrd looks at /sys/class/scsi_host/host$hostnum/proc_name to find
the module name of a disk driver. Current name is highbank-ahci but
the module is sata_highbank. Rename it to match the module name.

Cc: Rob Herring rob.herr...@calxeda.com
Cc: Alexander Graf ag...@suse.de
Cc: sta...@vger.kernel.org v3.7..
Signed-off-by: Robert Richter robert.rich...@calxeda.com
---
  drivers/ata/sata_highbank.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied



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


Re: [PATCH] drivers: ata: rcar: use devm_ioremap_resource()

2013-04-12 Thread Jeff Garzik

On 04/12/2013 02:51 AM, Silviu-Mihai Popescu wrote:

Convert  use of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
This was found with coccinelle.

Signed-off-by: Silviu-Mihai Popescu 
---
  drivers/ata/sata_rcar.c |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index caf33f6..8c51a3a 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -799,9 +799,9 @@ static int sata_rcar_probe(struct platform_device *pdev)

host->private_data = priv;

-   priv->base = devm_request_and_ioremap(>dev, mem);
-   if (!priv->base) {
-   ret = -EADDRNOTAVAIL;
+   priv->base = devm_ioremap_resource(>dev, mem);
+   if (IS_ERR(priv->base)) {
+   ret = PTR_ERR(priv->base);
goto cleanup;
}




See 2de1d5e159ccf317a9285a0dfaa6e4262500d7dd in libata-dev.git#upstream.

Jeff




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


Re: [PATCH] drivers: ata: rcar: use devm_ioremap_resource()

2013-04-12 Thread Jeff Garzik

On 04/12/2013 02:51 AM, Silviu-Mihai Popescu wrote:

Convert  use of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
This was found with coccinelle.

Signed-off-by: Silviu-Mihai Popescu silviupopescu1...@gmail.com
---
  drivers/ata/sata_rcar.c |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index caf33f6..8c51a3a 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -799,9 +799,9 @@ static int sata_rcar_probe(struct platform_device *pdev)

host-private_data = priv;

-   priv-base = devm_request_and_ioremap(pdev-dev, mem);
-   if (!priv-base) {
-   ret = -EADDRNOTAVAIL;
+   priv-base = devm_ioremap_resource(pdev-dev, mem);
+   if (IS_ERR(priv-base)) {
+   ret = PTR_ERR(priv-base);
goto cleanup;
}




See 2de1d5e159ccf317a9285a0dfaa6e4262500d7dd in libata-dev.git#upstream.

Jeff




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


[git patches] libata fixes

2013-04-08 Thread Jeff Garzik

The HDIO_DRIVE_* fix is really the biggie.

Please pull 6d3bfc7be6f80d0c6ee6800d58d573343bf6e260 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ata_piix.c| 14 +-
 drivers/ata/libata-core.c |  6 +-
 drivers/ata/libata-scsi.c |  8 
 include/linux/ata.h   |  2 +-
 include/linux/libata.h|  1 +
 5 files changed, 24 insertions(+), 7 deletions(-)

David Woodhouse (1):
  libata: fix DMA to stack in reading devslp_timing parameters

Krzysztof Mazur (1):
  [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression

Shan Hai (2):
  libata: Use integer return value for atapi_command_packet_set
  libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive

Youquan Song (1):
  ata_piix: Fix DVD not dectected at some Haswell platforms

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ffdd32d..2f48123 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -150,6 +150,7 @@ enum piix_controller_ids {
tolapai_sata,
piix_pata_vmw,  /* PIIX4 for VMware, spurious DMA_ERR */
ich8_sata_snb,
+   ich8_2port_sata_snb,
 };
 
 struct piix_map_db {
@@ -304,7 +305,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point) */
-   { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+   { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point-LP) */
@@ -439,6 +440,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
[ich8m_apple_sata]  = _apple_map_db,
[tolapai_sata]  = _map_db,
[ich8_sata_snb] = _map_db,
+   [ich8_2port_sata_snb]   = _2port_map_db,
 };
 
 static struct pci_bits piix_enable_bits[] = {
@@ -1242,6 +1244,16 @@ static struct ata_port_info piix_port_info[] = {
.udma_mask  = ATA_UDMA6,
.port_ops   = _sata_ops,
},
+
+   [ich8_2port_sata_snb] =
+   {
+   .flags  = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR
+   | PIIX_FLAG_PIO16,
+   .pio_mask   = ATA_PIO4,
+   .mwdma_mask = ATA_MWDMA2,
+   .udma_mask  = ATA_UDMA6,
+   .port_ops   = _sata_ops,
+   },
 };
 
 #define AHCI_PCI_BAR 5
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 497adea..63c743b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2329,7 +2329,7 @@ int ata_dev_configure(struct ata_device *dev)
 * from SATA Settings page of Identify Device Data Log.
 */
if (ata_id_has_devslp(dev->id)) {
-   u8 sata_setting[ATA_SECT_SIZE];
+   u8 *sata_setting = ap->sector_buf;
int i, j;
 
dev->flags |= ATA_DFLAG_DEVSLP;
@@ -2439,6 +2439,9 @@ int ata_dev_configure(struct ata_device *dev)
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
 dev->max_sectors);
 
+   if (dev->horkage & ATA_HORKAGE_MAX_SEC_LBA48)
+   dev->max_sectors = ATA_MAX_SECTORS_LBA48;
+
if (ap->ops->dev_config)
ap->ops->dev_config(dev);
 
@@ -4100,6 +4103,7 @@ static const struct ata_blacklist_entry 
ata_device_blacklist [] = {
/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
{ "QUANTUM DATDAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA },
+   { "Slimtype DVD A  DS8A8SH", NULL,  ATA_HORKAGE_MAX_SEC_LBA48 },
 
/* Devices we expect to fail diagnostics */
 
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..ff44787 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 );
-   if (sshdr.sense_key == 0 &&
-   sshdr.asc == 0 && sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR &&
+   sshdr.asc == 0 && sshdr.ascq == 0x1d)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
 
@@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr 

[git patches] libata fixes

2013-04-08 Thread Jeff Garzik

The HDIO_DRIVE_* fix is really the biggie.

Please pull 6d3bfc7be6f80d0c6ee6800d58d573343bf6e260 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ata_piix.c| 14 +-
 drivers/ata/libata-core.c |  6 +-
 drivers/ata/libata-scsi.c |  8 
 include/linux/ata.h   |  2 +-
 include/linux/libata.h|  1 +
 5 files changed, 24 insertions(+), 7 deletions(-)

David Woodhouse (1):
  libata: fix DMA to stack in reading devslp_timing parameters

Krzysztof Mazur (1):
  [libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression

Shan Hai (2):
  libata: Use integer return value for atapi_command_packet_set
  libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive

Youquan Song (1):
  ata_piix: Fix DVD not dectected at some Haswell platforms

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ffdd32d..2f48123 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -150,6 +150,7 @@ enum piix_controller_ids {
tolapai_sata,
piix_pata_vmw,  /* PIIX4 for VMware, spurious DMA_ERR */
ich8_sata_snb,
+   ich8_2port_sata_snb,
 };
 
 struct piix_map_db {
@@ -304,7 +305,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point) */
-   { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+   { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point-LP) */
@@ -439,6 +440,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
[ich8m_apple_sata]  = ich8m_apple_map_db,
[tolapai_sata]  = tolapai_map_db,
[ich8_sata_snb] = ich8_map_db,
+   [ich8_2port_sata_snb]   = ich8_2port_map_db,
 };
 
 static struct pci_bits piix_enable_bits[] = {
@@ -1242,6 +1244,16 @@ static struct ata_port_info piix_port_info[] = {
.udma_mask  = ATA_UDMA6,
.port_ops   = piix_sata_ops,
},
+
+   [ich8_2port_sata_snb] =
+   {
+   .flags  = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR
+   | PIIX_FLAG_PIO16,
+   .pio_mask   = ATA_PIO4,
+   .mwdma_mask = ATA_MWDMA2,
+   .udma_mask  = ATA_UDMA6,
+   .port_ops   = piix_sata_ops,
+   },
 };
 
 #define AHCI_PCI_BAR 5
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 497adea..63c743b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2329,7 +2329,7 @@ int ata_dev_configure(struct ata_device *dev)
 * from SATA Settings page of Identify Device Data Log.
 */
if (ata_id_has_devslp(dev-id)) {
-   u8 sata_setting[ATA_SECT_SIZE];
+   u8 *sata_setting = ap-sector_buf;
int i, j;
 
dev-flags |= ATA_DFLAG_DEVSLP;
@@ -2439,6 +2439,9 @@ int ata_dev_configure(struct ata_device *dev)
dev-max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
 dev-max_sectors);
 
+   if (dev-horkage  ATA_HORKAGE_MAX_SEC_LBA48)
+   dev-max_sectors = ATA_MAX_SECTORS_LBA48;
+
if (ap-ops-dev_config)
ap-ops-dev_config(dev);
 
@@ -4100,6 +4103,7 @@ static const struct ata_blacklist_entry 
ata_device_blacklist [] = {
/* Weird ATAPI devices */
{ TORiSAN DVD-ROM DRD-N216, NULL, ATA_HORKAGE_MAX_SEC_128 },
{ QUANTUM DATDAT72-000, NULL, ATA_HORKAGE_ATAPI_MOD16_DMA },
+   { Slimtype DVD A  DS8A8SH, NULL,  ATA_HORKAGE_MAX_SEC_LBA48 },
 
/* Devices we expect to fail diagnostics */
 
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..ff44787 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 sshdr);
-   if (sshdr.sense_key == 0 
-   sshdr.asc == 0  sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR 
+   sshdr.asc == 0  sshdr.ascq == 0x1d)
cmd_result = ~SAM_STAT_CHECK_CONDITION;
}
 
@@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct 

Re: [PATCH v0] Add SHA-3 hash algorithm

2013-04-03 Thread Jeff Garzik

On 10/03/2012 01:45 AM, Jeff Garzik wrote:


Whee -- SHA-3 is out!   I wanted to explore the new toy a bit, and
so, here is a blatantly untested rough draft of SHA-3 kernel support.

Why rough draft?  Because answers to the questions below will inform a
more polished version.


Just to update people...  this has been in a holding pattern, because 
apparently there are revisions to SHA-3 coming down the pipe.  They want 
to address preimage resistance, and make things faster in hardware.


Random quote from NIST, on the NIST hash-forum, which doesn't provide 
detail but does summarize general feeling: "As best we can tell, 
continuing to pay that performance penalty for all future uses of SHA3 
has no benefit.  (All this is a longwinded way of saying: we were wrong, 
but hopefully we got better.)"


Jeff




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


Re: [PATCH RFC 1/1] AHCI: Optimize interrupt processing

2013-04-03 Thread Jeff Garzik

On 03/06/2013 06:26 AM, Alexander Gordeev wrote:

Split interrupt service routine into hardware context handler and
threaded context handler. That allows to protect ports with individual
locks rather than with a single host-wide lock, which results in better
parallelism.

Signed-off-by: Alexander Gordeev 
---
  drivers/ata/acard-ahci.c|8 ++---
  drivers/ata/ahci.c  |   54 ++-
  drivers/ata/ahci.h  |   10 +++--
  drivers/ata/ahci_platform.c |3 +-
  drivers/ata/libahci.c   |   74 +--
  5 files changed, 85 insertions(+), 64 deletions(-)


applied



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


Re: [PATCH] drivers: ata: Use resource_size function

2013-04-03 Thread Jeff Garzik

On 03/16/2013 10:32 AM, Alexandru Gheorghiu wrote:

Use resource_size function instead of explicit computation.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu 
---
  drivers/ata/pata_octeon_cf.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied



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


Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-04-03 Thread Jeff Garzik

On 03/29/2013 01:56 AM, Gwendal Grignou wrote:

commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key
used for returning task registers, but HDIO_DRIVE_CMD ioctl was
not changed accordingly.

Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0
instead of EIO.

Signed-off-by: Gwendal Grignou 
---
  drivers/ata/libata-scsi.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)


applied the version from Krzysztof Mazur, which covered both cases



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


Re: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-04-03 Thread Jeff Garzik

On 03/27/2013 08:51 AM, Krzysztof Mazur wrote:

On Mon, Mar 25, 2013 at 06:26:50PM +0100, Ronald wrote:

In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD

Smartd does not work anymore since 84a9a8cd9 ([libata] Set proper SK
when CK_COND is set.).

I hope I'm not stepping on anyone's toe's by chosing the same title.
I'm not subscribed to this list.

Just wanted to add a 'me2'

[1] http://www.spinics.net/lists/linux-ide/msg45268.html


It seems that the SAM_STAT_CHECK_CONDITION is not cleared
causing -EIO, because that patch modified sensebuf and
the check for clearing SAM_STAT_CHECK_CONDITION is no longer valid.

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..ff44787 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 );
-   if (sshdr.sense_key == 0 &&
-   sshdr.asc == 0 && sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR &&
+   sshdr.asc == 0 && sshdr.ascq == 0x1d)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}

@@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
);
-   if (sshdr.sense_key == 0 &&
-   sshdr.asc == 0 && sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR &&
+   sshdr.asc == 0 && sshdr.ascq == 0x1d)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;


applied



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


Re: [PATCH v3] ata: Fix DVD not dectected at some Haswell platforms

2013-04-03 Thread Jeff Garzik

On 03/06/2013 10:49 AM, Youquan Song wrote:

There is a quirk patch 5e5a4f5d5a08c9c504fe956391ac3dae2c66556d
"ata_piix: make DVD Drive recognisable on systems with Intel Sandybridge
  chipsets(v2)" fixing the 4 ports IDE controller 32bit PIO mode.

We've hit a problem with DVD not recognized on Haswell Desktop platform which
includes Lynx Point 2-port SATA controller.

This quirk patch disables 32bit PIO on this controller in IDE mode.

v2: Change spelling error in statememnt pointed by Sergei Shtylyov.
v3: Change comment statememnt and spliting line over 80 characters pointed by
 Libor Pechacek and also rebase the patch against 3.8-rc7 kernel.

Tested-by: Lee, Chun-Yi 
Signed-off-by: Youquan Song 
Cc: sta...@vger.kernel.org
---
  drivers/ata/ata_piix.c |   14 +-
  1 files changed, 13 insertions(+), 1 deletions(-)


applied



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


Re: [PATCH v3] ata: Fix DVD not dectected at some Haswell platforms

2013-04-03 Thread Jeff Garzik

On 03/06/2013 10:49 AM, Youquan Song wrote:

There is a quirk patch 5e5a4f5d5a08c9c504fe956391ac3dae2c66556d
ata_piix: make DVD Drive recognisable on systems with Intel Sandybridge
  chipsets(v2) fixing the 4 ports IDE controller 32bit PIO mode.

We've hit a problem with DVD not recognized on Haswell Desktop platform which
includes Lynx Point 2-port SATA controller.

This quirk patch disables 32bit PIO on this controller in IDE mode.

v2: Change spelling error in statememnt pointed by Sergei Shtylyov.
v3: Change comment statememnt and spliting line over 80 characters pointed by
 Libor Pechacek and also rebase the patch against 3.8-rc7 kernel.

Tested-by: Lee, Chun-Yi j...@suse.com
Signed-off-by: Youquan Song youquan.s...@intel.com
Cc: sta...@vger.kernel.org
---
  drivers/ata/ata_piix.c |   14 +-
  1 files changed, 13 insertions(+), 1 deletions(-)


applied



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


Re: ata: HDIO_DRIVE_* ioctl() Linux 3.9 regression

2013-04-03 Thread Jeff Garzik

On 03/27/2013 08:51 AM, Krzysztof Mazur wrote:

On Mon, Mar 25, 2013 at 06:26:50PM +0100, Ronald wrote:

In reply to [1]: I have the same issue. Git bisect took 50+ rebuilds xD

Smartd does not work anymore since 84a9a8cd9 ([libata] Set proper SK
when CK_COND is set.).

I hope I'm not stepping on anyone's toe's by chosing the same title.
I'm not subscribed to this list.

Just wanted to add a 'me2'

[1] http://www.spinics.net/lists/linux-ide/msg45268.html


It seems that the SAM_STAT_CHECK_CONDITION is not cleared
causing -EIO, because that patch modified sensebuf and
the check for clearing SAM_STAT_CHECK_CONDITION is no longer valid.

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..ff44787 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 sshdr);
-   if (sshdr.sense_key == 0 
-   sshdr.asc == 0  sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR 
+   sshdr.asc == 0  sshdr.ascq == 0x1d)
cmd_result = ~SAM_STAT_CHECK_CONDITION;
}

@@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user 
*arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
sshdr);
-   if (sshdr.sense_key == 0 
-   sshdr.asc == 0  sshdr.ascq == 0)
+   if (sshdr.sense_key == RECOVERED_ERROR 
+   sshdr.asc == 0  sshdr.ascq == 0x1d)
cmd_result = ~SAM_STAT_CHECK_CONDITION;


applied



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


Re: [PATCH] [libata] Fix HDIO_DRIVE_CMD ioctl sense data check

2013-04-03 Thread Jeff Garzik

On 03/29/2013 01:56 AM, Gwendal Grignou wrote:

commit 84a9a8cd9d0aa93c17e5815ab8a9cc4c0a765c63 changed the sense key
used for returning task registers, but HDIO_DRIVE_CMD ioctl was
not changed accordingly.

Tested: check that SMART ENABLE sent using HDIO_DRIVE_CMD returns 0
instead of EIO.

Signed-off-by: Gwendal Grignou gwen...@google.com
---
  drivers/ata/libata-scsi.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)


applied the version from Krzysztof Mazur, which covered both cases



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


Re: [PATCH] drivers: ata: Use resource_size function

2013-04-03 Thread Jeff Garzik

On 03/16/2013 10:32 AM, Alexandru Gheorghiu wrote:

Use resource_size function instead of explicit computation.
Patch found using coccinelle.

Signed-off-by: Alexandru Gheorghiu gheorghiuan...@gmail.com
---
  drivers/ata/pata_octeon_cf.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied



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


Re: [PATCH RFC 1/1] AHCI: Optimize interrupt processing

2013-04-03 Thread Jeff Garzik

On 03/06/2013 06:26 AM, Alexander Gordeev wrote:

Split interrupt service routine into hardware context handler and
threaded context handler. That allows to protect ports with individual
locks rather than with a single host-wide lock, which results in better
parallelism.

Signed-off-by: Alexander Gordeev agord...@redhat.com
---
  drivers/ata/acard-ahci.c|8 ++---
  drivers/ata/ahci.c  |   54 ++-
  drivers/ata/ahci.h  |   10 +++--
  drivers/ata/ahci_platform.c |3 +-
  drivers/ata/libahci.c   |   74 +--
  5 files changed, 85 insertions(+), 64 deletions(-)


applied



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


Re: [PATCH v0] Add SHA-3 hash algorithm

2013-04-03 Thread Jeff Garzik

On 10/03/2012 01:45 AM, Jeff Garzik wrote:


Whee -- SHA-3 is out!   I wanted to explore the new toy a bit, and
so, here is a blatantly untested rough draft of SHA-3 kernel support.

Why rough draft?  Because answers to the questions below will inform a
more polished version.


Just to update people...  this has been in a holding pattern, because 
apparently there are revisions to SHA-3 coming down the pipe.  They want 
to address preimage resistance, and make things faster in hardware.


Random quote from NIST, on the NIST hash-forum, which doesn't provide 
detail but does summarize general feeling: As best we can tell, 
continuing to pay that performance penalty for all future uses of SHA3 
has no benefit.  (All this is a longwinded way of saying: we were wrong, 
but hopefully we got better.)


Jeff




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


[git patches] libata minor updates

2013-03-22 Thread Jeff Garzik

Please pull b186affe0c9d39e4d3152cd34bffea8fe1fa17f4 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/Kconfig   | 13 +++--
 drivers/ata/ahci.c|  2 ++
 drivers/ata/ata_piix.c|  4 
 drivers/ata/libata-acpi.c |  2 +-
 drivers/ata/pata_samsung_cf.c | 13 +
 drivers/ata/sata_fsl.c|  3 +--
 6 files changed, 16 insertions(+), 21 deletions(-)

Aaron Lu (1):
  [libata] Avoid specialized TLA's in ZPODD's Kconfig

Andrew Brownfield (1):
  ata_piix: Add MODULE_PARM_DESC to prefer_ms_hyperv

James Ralston (1):
  ahci: Add Device IDs for Intel Wellsburg PCH

Jingoo Han (1):
  pata_samsung_cf: use module_platform_driver_probe()

Sander Eikelenboom (1):
  libata-acpi.c: fix copy and paste mistake in 
ata_acpi_register_power_resource

Syam Sidhardhan (1):
  sata_fsl: Remove redundant NULL check before kfree

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 3e751b7..a5a3ebc 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -59,15 +59,16 @@ config ATA_ACPI
  option libata.noacpi=1
 
 config SATA_ZPODD
-   bool "SATA Zero Power ODD Support"
+   bool "SATA Zero Power Optical Disc Drive (ZPODD) support"
depends on ATA_ACPI
default n
help
- This option adds support for SATA ZPODD. It requires both
- ODD and the platform support, and if enabled, will automatically
- power on/off the ODD when certain condition is satisfied. This
- does not impact user's experience of the ODD, only power is saved
- when ODD is not in use(i.e. no disc inside).
+ This option adds support for SATA Zero Power Optical Disc
+ Drive (ZPODD). It requires both the ODD and the platform
+ support, and if enabled, will automatically power on/off the
+ ODD when certain condition is satisfied. This does not impact
+ end user's experience of the ODD, only power is saved when
+ the ODD is not in use (i.e. no disc inside).
 
  If unsure, say N.
 
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a99112c..6a67b07 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -281,6 +281,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */
+   { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
+   { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
{ PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d2ba439..ffdd32d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1547,6 +1547,10 @@ static bool piix_broken_system_poweroff(struct pci_dev 
*pdev)
 
 static int prefer_ms_hyperv = 1;
 module_param(prefer_ms_hyperv, int, 0);
+MODULE_PARM_DESC(prefer_ms_hyperv,
+   "Prefer Hyper-V paravirtualization drivers instead of ATA, "
+   "0 - Use ATA drivers, "
+   "1 (Default) - Use the paravirtualization drivers.");
 
 static void piix_ignore_devices_quirk(struct ata_host *host)
 {
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 0ea1018..cb3eab6d 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct 
ata_device *dev)
 
handle = ata_dev_acpi_handle(dev);
if (handle)
-   acpi_dev_pm_remove_dependent(handle, >sdev_gendev);
+   acpi_dev_pm_add_dependent(handle, >sdev_gendev);
 }
 
 static void ata_acpi_unregister_power_resource(struct ata_device *dev)
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 70b0e01..6ef27e9 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -661,18 +661,7 @@ static struct platform_driver pata_s3c_driver = {
},
 };
 
-static int __init pata_s3c_init(void)
-{
-   return platform_driver_probe(_s3c_driver, pata_s3c_probe);
-}
-
-static void __exit pata_s3c_exit(void)
-{
-   platform_driver_unregister(_s3c_driver);
-}
-
-module_init(pata_s3c_init);
-module_exit(pata_s3c_exit);
+module_platform_driver_probe(pata_s3c_driver, pata_s3c_probe);
 
 MODULE_AUTHOR("Abhilash Kesavan, ");
 MODULE_DESCRIPTION("low-level driver for Samsung PATA controller");
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 124b2c1..608f82f 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1511,8 +1511,7 @@ error_exit_with_cleanup:
 
if (hcr_base)

[git patches] libata minor updates

2013-03-22 Thread Jeff Garzik

Please pull b186affe0c9d39e4d3152cd34bffea8fe1fa17f4 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/Kconfig   | 13 +++--
 drivers/ata/ahci.c|  2 ++
 drivers/ata/ata_piix.c|  4 
 drivers/ata/libata-acpi.c |  2 +-
 drivers/ata/pata_samsung_cf.c | 13 +
 drivers/ata/sata_fsl.c|  3 +--
 6 files changed, 16 insertions(+), 21 deletions(-)

Aaron Lu (1):
  [libata] Avoid specialized TLA's in ZPODD's Kconfig

Andrew Brownfield (1):
  ata_piix: Add MODULE_PARM_DESC to prefer_ms_hyperv

James Ralston (1):
  ahci: Add Device IDs for Intel Wellsburg PCH

Jingoo Han (1):
  pata_samsung_cf: use module_platform_driver_probe()

Sander Eikelenboom (1):
  libata-acpi.c: fix copy and paste mistake in 
ata_acpi_register_power_resource

Syam Sidhardhan (1):
  sata_fsl: Remove redundant NULL check before kfree

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 3e751b7..a5a3ebc 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -59,15 +59,16 @@ config ATA_ACPI
  option libata.noacpi=1
 
 config SATA_ZPODD
-   bool SATA Zero Power ODD Support
+   bool SATA Zero Power Optical Disc Drive (ZPODD) support
depends on ATA_ACPI
default n
help
- This option adds support for SATA ZPODD. It requires both
- ODD and the platform support, and if enabled, will automatically
- power on/off the ODD when certain condition is satisfied. This
- does not impact user's experience of the ODD, only power is saved
- when ODD is not in use(i.e. no disc inside).
+ This option adds support for SATA Zero Power Optical Disc
+ Drive (ZPODD). It requires both the ODD and the platform
+ support, and if enabled, will automatically power on/off the
+ ODD when certain condition is satisfied. This does not impact
+ end user's experience of the ODD, only power is saved when
+ the ODD is not in use (i.e. no disc inside).
 
  If unsure, say N.
 
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a99112c..6a67b07 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -281,6 +281,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */
+   { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
+   { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
{ PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d2ba439..ffdd32d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1547,6 +1547,10 @@ static bool piix_broken_system_poweroff(struct pci_dev 
*pdev)
 
 static int prefer_ms_hyperv = 1;
 module_param(prefer_ms_hyperv, int, 0);
+MODULE_PARM_DESC(prefer_ms_hyperv,
+   Prefer Hyper-V paravirtualization drivers instead of ATA, 
+   0 - Use ATA drivers, 
+   1 (Default) - Use the paravirtualization drivers.);
 
 static void piix_ignore_devices_quirk(struct ata_host *host)
 {
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 0ea1018..cb3eab6d 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1027,7 +1027,7 @@ static void ata_acpi_register_power_resource(struct 
ata_device *dev)
 
handle = ata_dev_acpi_handle(dev);
if (handle)
-   acpi_dev_pm_remove_dependent(handle, sdev-sdev_gendev);
+   acpi_dev_pm_add_dependent(handle, sdev-sdev_gendev);
 }
 
 static void ata_acpi_unregister_power_resource(struct ata_device *dev)
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index 70b0e01..6ef27e9 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -661,18 +661,7 @@ static struct platform_driver pata_s3c_driver = {
},
 };
 
-static int __init pata_s3c_init(void)
-{
-   return platform_driver_probe(pata_s3c_driver, pata_s3c_probe);
-}
-
-static void __exit pata_s3c_exit(void)
-{
-   platform_driver_unregister(pata_s3c_driver);
-}
-
-module_init(pata_s3c_init);
-module_exit(pata_s3c_exit);
+module_platform_driver_probe(pata_s3c_driver, pata_s3c_probe);
 
 MODULE_AUTHOR(Abhilash Kesavan, a.kesa...@samsung.com);
 MODULE_DESCRIPTION(low-level driver for Samsung PATA controller);
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 124b2c1..608f82f 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1511,8 +1511,7 @@ error_exit_with_cleanup:
 
if 

Re: [PATCH v2] [libata] Avoid specialized TLA's in ZPODD's Kconfig

2013-03-04 Thread Jeff Garzik

On 03/02/2013 12:00 AM, Aaron Lu wrote:

ODD is not a common TLA for non-ATA people so they will get confused
by its meaning when they are configuring the kernel. This patch fixed
this problem by using ODD only after stating what it is.

Signed-off-by: Aaron Lu 
---
v2:
Add a space before open paren as suggested by Sergei Shtylyov.

  drivers/ata/Kconfig | 13 +++--
  1 file changed, 7 insertions(+), 6 deletions(-)


applied



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


Re: [PATCH] ata_piix: Add MODULE_PARM_DESC to prefer_ms_hyperv

2013-03-04 Thread Jeff Garzik

On 02/21/2013 02:01 PM, Rado Vrbovsky wrote:

From: Andrew Brownfield 

In reference to the commit cd006086fa5d91414d8ff9ff2b78fbb593878e3c
"ata_piix: defer disks to the Hyper-V drivers by default",
this trivial patch adds a description to prefer_ms_hyperv.

[rvrbo...@redhat.com: MODULE_PARM_DESC() string formatting modified]

Signed-off-by: Andrew Brownfield 
Signed-off-by: Radomir Vrbovsky 

---
  drivers/ata/ata_piix.c | 4 
  1 file changed, 4 insertions(+)


applied [manually]



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


Re: [PATCH 1/1] ahci: Add Device IDs for Intel Wellsburg PCH

2013-03-04 Thread Jeff Garzik

On 02/21/2013 02:08 PM, James Ralston wrote:

This patch adds the RAID-mode SATA Device IDs for the Intel Wellsburg PCH

Signed-off-by: James Ralston 
---
  drivers/ata/ahci.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


applied [manually]



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


Re: [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource

2013-03-04 Thread Jeff Garzik

On 03/01/2013 06:16 AM, Sander Eikelenboom wrote:

Fix a copy and paste mistake introduced in:

commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
"ACPI / PM: Rework the handling of devices depending on power resources"

Signed-off-by: Sander Eikelenboom 
---
  drivers/ata/libata-acpi.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


applied



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


Re: [PATCH] libata-acpi.c: fix copy and paste mistake in ata_acpi_register_power_resource

2013-03-04 Thread Jeff Garzik

On 03/01/2013 06:16 AM, Sander Eikelenboom wrote:

Fix a copy and paste mistake introduced in:

commit bc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
ACPI / PM: Rework the handling of devices depending on power resources

Signed-off-by: Sander Eikelenboom li...@eikelenboom.it
---
  drivers/ata/libata-acpi.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


applied



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


Re: [PATCH 1/1] ahci: Add Device IDs for Intel Wellsburg PCH

2013-03-04 Thread Jeff Garzik

On 02/21/2013 02:08 PM, James Ralston wrote:

This patch adds the RAID-mode SATA Device IDs for the Intel Wellsburg PCH

Signed-off-by: James Ralston james.d.rals...@intel.com
---
  drivers/ata/ahci.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


applied [manually]



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


Re: [PATCH] ata_piix: Add MODULE_PARM_DESC to prefer_ms_hyperv

2013-03-04 Thread Jeff Garzik

On 02/21/2013 02:01 PM, Rado Vrbovsky wrote:

From: Andrew Brownfield abrow...@redhat.com

In reference to the commit cd006086fa5d91414d8ff9ff2b78fbb593878e3c
ata_piix: defer disks to the Hyper-V drivers by default,
this trivial patch adds a description to prefer_ms_hyperv.

[rvrbo...@redhat.com: MODULE_PARM_DESC() string formatting modified]

Signed-off-by: Andrew Brownfield abrow...@redhat.com
Signed-off-by: Radomir Vrbovsky rvrbo...@redhat.com

---
  drivers/ata/ata_piix.c | 4 
  1 file changed, 4 insertions(+)


applied [manually]



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


Re: [PATCH v2] [libata] Avoid specialized TLA's in ZPODD's Kconfig

2013-03-04 Thread Jeff Garzik

On 03/02/2013 12:00 AM, Aaron Lu wrote:

ODD is not a common TLA for non-ATA people so they will get confused
by its meaning when they are configuring the kernel. This patch fixed
this problem by using ODD only after stating what it is.

Signed-off-by: Aaron Lu aaron...@intel.com
---
v2:
Add a space before open paren as suggested by Sergei Shtylyov.

  drivers/ata/Kconfig | 13 +++--
  1 file changed, 7 insertions(+), 6 deletions(-)


applied



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


Re: [PATCH 2/2] ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type

2013-02-28 Thread Jeff Garzik

On 02/28/2013 04:53 PM, Rafael J. Wysocki wrote:

From: Rafael J. Wysocki 

After PCI and USB have stopped using the .find_bridge() callback in
struct acpi_bus_type, the only remaining user of it is SATA, but SATA
only pretends to be a user, because it points that callback to a stub
always returning -ENODEV.

For this reason, drop the SATA's dummy .find_bridge() callback and
remove .find_bridge(), which is not used any more, from struct
acpi_bus_type entirely.

Signed-off-by: Rafael J. Wysocki 
---
  drivers/acpi/glue.c   |   26 +-
  drivers/ata/libata-acpi.c |6 --
  include/acpi/acpi_bus.h   |3 ---
  3 files changed, 1 insertion(+), 34 deletions(-)


patches 1-2 Acked-by: Jeff Garzik 



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


Re: [PATCH 2/2] ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type

2013-02-28 Thread Jeff Garzik

On 02/28/2013 04:53 PM, Rafael J. Wysocki wrote:

From: Rafael J. Wysocki rafael.j.wyso...@intel.com

After PCI and USB have stopped using the .find_bridge() callback in
struct acpi_bus_type, the only remaining user of it is SATA, but SATA
only pretends to be a user, because it points that callback to a stub
always returning -ENODEV.

For this reason, drop the SATA's dummy .find_bridge() callback and
remove .find_bridge(), which is not used any more, from struct
acpi_bus_type entirely.

Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com
---
  drivers/acpi/glue.c   |   26 +-
  drivers/ata/libata-acpi.c |6 --
  include/acpi/acpi_bus.h   |3 ---
  3 files changed, 1 insertion(+), 34 deletions(-)


patches 1-2 Acked-by: Jeff Garzik jgar...@pobox.com



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


Re: [GIT PULL] ACPI and power management fixes for v3.9-rc1

2013-02-26 Thread Jeff Garzik

On 02/26/2013 11:58 AM, Tejun Heo wrote:

On Tue, Feb 26, 2013 at 08:47:30AM -0800, Linus Torvalds wrote:

Anyway, in the US it is definitely not a common term for normal people.


Googling "odd" doesn't give anything on optical drives on the first
page.  On the other hand, >70% is about optical drives on naver.com.
The discrepancy is funny given that most computer terms in Korea come
from US.  Maybe it's because the character combination "odd" doesn't
have any other meaning.  Even then, I'm surprised there's no optical
drive result at all in the first page of google search.  Definitely
doesn't seem like a common term in US.


There is just a lot more "odd" goings-on in the US.  Korea is simply 
less odd than the US :)


Will send a patch to fix...

Jeff




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


Re: Reproduceable SATA lockup on 3.7.8 with SSD

2013-02-26 Thread Jeff Garzik

On 02/25/2013 07:27 PM, Marc MERLIN wrote:

Howdy,

I seem to have the same problem (or similar) as Mathieu Desnoyers in
https://lkml.org/lkml/2013/2/22/437

I can reliably get my SSD to drop from the SATA bus given the right workload
on linux.

How can I tell if it's linux's fault of the drive's fault?


Manually force speed to 3.0 Gbps, then 1.5 Gbps, and see what happens.

Try module/kernel parameter libata.force=1.5Gbps or libata.force=3.0Gbps

Jeff




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


Re: Reproduceable SATA lockup on 3.7.8 with SSD

2013-02-26 Thread Jeff Garzik

On 02/25/2013 07:27 PM, Marc MERLIN wrote:

Howdy,

I seem to have the same problem (or similar) as Mathieu Desnoyers in
https://lkml.org/lkml/2013/2/22/437

I can reliably get my SSD to drop from the SATA bus given the right workload
on linux.

How can I tell if it's linux's fault of the drive's fault?


Manually force speed to 3.0 Gbps, then 1.5 Gbps, and see what happens.

Try module/kernel parameter libata.force=1.5Gbps or libata.force=3.0Gbps

Jeff




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


Re: [GIT PULL] ACPI and power management fixes for v3.9-rc1

2013-02-26 Thread Jeff Garzik

On 02/26/2013 11:58 AM, Tejun Heo wrote:

On Tue, Feb 26, 2013 at 08:47:30AM -0800, Linus Torvalds wrote:

Anyway, in the US it is definitely not a common term for normal people.


Googling odd doesn't give anything on optical drives on the first
page.  On the other hand, 70% is about optical drives on naver.com.
The discrepancy is funny given that most computer terms in Korea come
from US.  Maybe it's because the character combination odd doesn't
have any other meaning.  Even then, I'm surprised there's no optical
drive result at all in the first page of google search.  Definitely
doesn't seem like a common term in US.


There is just a lot more odd goings-on in the US.  Korea is simply 
less odd than the US :)


Will send a patch to fix...

Jeff




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


Re: [PATCH 2/3] ahci: AHCI-mode SATA patch for Intel Avoton DeviceIDs

2013-01-25 Thread Jeff Garzik

On 01/25/2013 03:01 PM, Seth Heasley wrote:

This patch adds the AHCI and RAID-mode SATA DeviceIDs for the Intel Avoton SOC.

Signed-off-by: Seth Heasley 
---
  drivers/ata/ahci.c | 16 
  1 file changed, 16 insertions(+)


applied 1-2



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


Re: [PATCH 2/3] ahci: AHCI-mode SATA patch for Intel Avoton DeviceIDs

2013-01-25 Thread Jeff Garzik

On 01/25/2013 03:01 PM, Seth Heasley wrote:

This patch adds the AHCI and RAID-mode SATA DeviceIDs for the Intel Avoton SOC.

Signed-off-by: Seth Heasley seth.heas...@intel.com
---
  drivers/ata/ahci.c | 16 
  1 file changed, 16 insertions(+)


applied 1-2



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


[git patches] libata fixes

2013-01-21 Thread Jeff Garzik

Please pull 803739d25c2343da6d2f95eebdcbc08bf67097d4 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus

to receive the following updates:

 drivers/ata/ahci.c|  8 +++-
 drivers/ata/libahci.c |  6 +++---
 drivers/ata/libata-core.c | 22 +-
 drivers/ata/libata-eh.c   |  2 +-
 include/linux/ata.h   |  8 +---
 include/linux/libata.h|  4 ++--
 6 files changed, 31 insertions(+), 19 deletions(-)

Bian Yu (1):
  [libata] ahci: Fix lack of command retry after a success error handler.

Hugh Daschbach (1):
  [libata] ahci: Add support for Enmotus Bobcat device.

Shane Huang (1):
  [libata] replace sata_settings with devslp_timing

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7862d17..4979127 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -53,6 +53,7 @@
 
 enum {
AHCI_PCI_BAR_STA2X11= 0,
+   AHCI_PCI_BAR_ENMOTUS= 2,
AHCI_PCI_BAR_STANDARD   = 5,
 };
 
@@ -410,6 +411,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci },   /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci },   /* ASM1062 */
 
+   /* Enmotus */
+   { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+
/* Generic, PCI class code for AHCI */
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
  PCI_CLASS_STORAGE_SATA_AHCI, 0xff, board_ahci },
@@ -1098,9 +1102,11 @@ static int ahci_init_one(struct pci_dev *pdev, const 
struct pci_device_id *ent)
dev_info(>dev,
 "PDC42819 can only drive SATA devices with this 
driver\n");
 
-   /* The Connext uses non-standard BAR */
+   /* Both Connext and Enmotus devices use non-standard BARs */
if (pdev->vendor == PCI_VENDOR_ID_STMICRO && pdev->device == 0xCC06)
ahci_pci_bar = AHCI_PCI_BAR_STA2X11;
+   else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000)
+   ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
 
/* acquire resources */
rc = pcim_enable_device(pdev);
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 320712a..6cd7805 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1951,13 +1951,13 @@ static void ahci_set_aggressive_devslp(struct ata_port 
*ap, bool sleep)
/* Use the nominal value 10 ms if the read MDAT is zero,
 * the nominal value of DETO is 20 ms.
 */
-   if (dev->sata_settings[ATA_LOG_DEVSLP_VALID] &
+   if (dev->devslp_timing[ATA_LOG_DEVSLP_VALID] &
ATA_LOG_DEVSLP_VALID_MASK) {
-   mdat = dev->sata_settings[ATA_LOG_DEVSLP_MDAT] &
+   mdat = dev->devslp_timing[ATA_LOG_DEVSLP_MDAT] &
   ATA_LOG_DEVSLP_MDAT_MASK;
if (!mdat)
mdat = 10;
-   deto = dev->sata_settings[ATA_LOG_DEVSLP_DETO];
+   deto = dev->devslp_timing[ATA_LOG_DEVSLP_DETO];
if (!deto)
deto = 20;
} else {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9e8b99a..46cd3f4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2325,24 +2325,28 @@ int ata_dev_configure(struct ata_device *dev)
}
}
 
-   /* check and mark DevSlp capability */
-   if (ata_id_has_devslp(dev->id))
-   dev->flags |= ATA_DFLAG_DEVSLP;
-
-   /* Obtain SATA Settings page from Identify Device Data Log,
-* which contains DevSlp timing variables etc.
-* Exclude old devices with ata_id_has_ncq()
+   /* Check and mark DevSlp capability. Get DevSlp timing variables
+* from SATA Settings page of Identify Device Data Log.
 */
-   if (ata_id_has_ncq(dev->id)) {
+   if (ata_id_has_devslp(dev->id)) {
+   u8 sata_setting[ATA_SECT_SIZE];
+   int i, j;
+
+   dev->flags |= ATA_DFLAG_DEVSLP;
err_mask = ata_read_log_page(dev,
 ATA_LOG_SATA_ID_DEV_DATA,
 ATA_LOG_SATA_SETTINGS,
-dev->sata_settings,
+sata_setting,
 1);
if (err_mask)
ata_dev_dbg(dev,
"failed to get Identify Device 
Data, Emask 0x%x\n",
err_mask);
+   else
+   for (i = 0; i < ATA_LOG_DEVSLP_SIZE; i++) {
+   j = ATA_LOG_DEVSLP_OFFSET + i;
+   

[git patches] libata fixes

2013-01-21 Thread Jeff Garzik

Please pull 803739d25c2343da6d2f95eebdcbc08bf67097d4 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus

to receive the following updates:

 drivers/ata/ahci.c|  8 +++-
 drivers/ata/libahci.c |  6 +++---
 drivers/ata/libata-core.c | 22 +-
 drivers/ata/libata-eh.c   |  2 +-
 include/linux/ata.h   |  8 +---
 include/linux/libata.h|  4 ++--
 6 files changed, 31 insertions(+), 19 deletions(-)

Bian Yu (1):
  [libata] ahci: Fix lack of command retry after a success error handler.

Hugh Daschbach (1):
  [libata] ahci: Add support for Enmotus Bobcat device.

Shane Huang (1):
  [libata] replace sata_settings with devslp_timing

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7862d17..4979127 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -53,6 +53,7 @@
 
 enum {
AHCI_PCI_BAR_STA2X11= 0,
+   AHCI_PCI_BAR_ENMOTUS= 2,
AHCI_PCI_BAR_STANDARD   = 5,
 };
 
@@ -410,6 +411,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci },   /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci },   /* ASM1062 */
 
+   /* Enmotus */
+   { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+
/* Generic, PCI class code for AHCI */
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
  PCI_CLASS_STORAGE_SATA_AHCI, 0xff, board_ahci },
@@ -1098,9 +1102,11 @@ static int ahci_init_one(struct pci_dev *pdev, const 
struct pci_device_id *ent)
dev_info(pdev-dev,
 PDC42819 can only drive SATA devices with this 
driver\n);
 
-   /* The Connext uses non-standard BAR */
+   /* Both Connext and Enmotus devices use non-standard BARs */
if (pdev-vendor == PCI_VENDOR_ID_STMICRO  pdev-device == 0xCC06)
ahci_pci_bar = AHCI_PCI_BAR_STA2X11;
+   else if (pdev-vendor == 0x1c44  pdev-device == 0x8000)
+   ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
 
/* acquire resources */
rc = pcim_enable_device(pdev);
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 320712a..6cd7805 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1951,13 +1951,13 @@ static void ahci_set_aggressive_devslp(struct ata_port 
*ap, bool sleep)
/* Use the nominal value 10 ms if the read MDAT is zero,
 * the nominal value of DETO is 20 ms.
 */
-   if (dev-sata_settings[ATA_LOG_DEVSLP_VALID] 
+   if (dev-devslp_timing[ATA_LOG_DEVSLP_VALID] 
ATA_LOG_DEVSLP_VALID_MASK) {
-   mdat = dev-sata_settings[ATA_LOG_DEVSLP_MDAT] 
+   mdat = dev-devslp_timing[ATA_LOG_DEVSLP_MDAT] 
   ATA_LOG_DEVSLP_MDAT_MASK;
if (!mdat)
mdat = 10;
-   deto = dev-sata_settings[ATA_LOG_DEVSLP_DETO];
+   deto = dev-devslp_timing[ATA_LOG_DEVSLP_DETO];
if (!deto)
deto = 20;
} else {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9e8b99a..46cd3f4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2325,24 +2325,28 @@ int ata_dev_configure(struct ata_device *dev)
}
}
 
-   /* check and mark DevSlp capability */
-   if (ata_id_has_devslp(dev-id))
-   dev-flags |= ATA_DFLAG_DEVSLP;
-
-   /* Obtain SATA Settings page from Identify Device Data Log,
-* which contains DevSlp timing variables etc.
-* Exclude old devices with ata_id_has_ncq()
+   /* Check and mark DevSlp capability. Get DevSlp timing variables
+* from SATA Settings page of Identify Device Data Log.
 */
-   if (ata_id_has_ncq(dev-id)) {
+   if (ata_id_has_devslp(dev-id)) {
+   u8 sata_setting[ATA_SECT_SIZE];
+   int i, j;
+
+   dev-flags |= ATA_DFLAG_DEVSLP;
err_mask = ata_read_log_page(dev,
 ATA_LOG_SATA_ID_DEV_DATA,
 ATA_LOG_SATA_SETTINGS,
-dev-sata_settings,
+sata_setting,
 1);
if (err_mask)
ata_dev_dbg(dev,
failed to get Identify Device 
Data, Emask 0x%x\n,
err_mask);
+   else
+   for (i = 0; i  ATA_LOG_DEVSLP_SIZE; i++) {
+   j = ATA_LOG_DEVSLP_OFFSET + i;
+   

Re: [3.8-{rc1,rc2}] ata1.00: failed to get Identify Device Data, Emask 0x1

2013-01-16 Thread Jeff Garzik

On 01/16/2013 05:10 AM, Sedat Dilek wrote:

On Sat, Jan 5, 2013 at 3:20 AM, Huang, Shane  wrote:

OK, I see the patch I mentioned to fix the problem was later reverted [1].
The real fix is "libata: replace sata_settings with devslp_timing" [2].


Yes, please use [2] which can also be found in kernel bugzilla #51881
and is pending on Jeff's acceptance. Sorry for the trouble to you guys.



[ CCing Linus ]

Thanks for taking care (my latest experiences on LKML/linux-next tell
me even this is no more the fact!)!

Your patch finally hit Linux-Next (next-20130116) and IIRC it is also
marked for previous Linux-kernel releases (CC -stable).
I have tested your patch as said also against Linux v3.8-rcX.

Unfortunately, the applied patch in Linux-Next does not contain any of
my desired Reported-by/Tested-by.
This makes me a bit unhappy, but I do NOT insist on it.

Mr. Torvalds himself pointed several times to all maintainers to
honour people - even they report and ideally report-and-test!

I am doing all my testings in my free-time and I am not paid for it.
I am raping my hardware here!
I can't do more than that!


We definitely appreciate that.  The patch in question actually went into 
the git repository before your report was received.  You did not see it 
in linux-next until my local git repository was pushed out to kernel.org 
(and thus automatically included in linux-next).


Jeff




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


Re: [3.8-{rc1,rc2}] ata1.00: failed to get Identify Device Data, Emask 0x1

2013-01-16 Thread Jeff Garzik

On 01/16/2013 05:10 AM, Sedat Dilek wrote:

On Sat, Jan 5, 2013 at 3:20 AM, Huang, Shane shane.hu...@amd.com wrote:

OK, I see the patch I mentioned to fix the problem was later reverted [1].
The real fix is libata: replace sata_settings with devslp_timing [2].


Yes, please use [2] which can also be found in kernel bugzilla #51881
and is pending on Jeff's acceptance. Sorry for the trouble to you guys.



[ CCing Linus ]

Thanks for taking care (my latest experiences on LKML/linux-next tell
me even this is no more the fact!)!

Your patch finally hit Linux-Next (next-20130116) and IIRC it is also
marked for previous Linux-kernel releases (CC -stable).
I have tested your patch as said also against Linux v3.8-rcX.

Unfortunately, the applied patch in Linux-Next does not contain any of
my desired Reported-by/Tested-by.
This makes me a bit unhappy, but I do NOT insist on it.

Mr. Torvalds himself pointed several times to all maintainers to
honour people - even they report and ideally report-and-test!

I am doing all my testings in my free-time and I am not paid for it.
I am raping my hardware here!
I can't do more than that!


We definitely appreciate that.  The patch in question actually went into 
the git repository before your report was received.  You did not see it 
in linux-next until my local git repository was pushed out to kernel.org 
(and thus automatically included in linux-next).


Jeff




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


Re: [PATCH] Allow Marvell SATA driver to work with LEDS_TRIGGER_IDE_DISK

2013-01-09 Thread Jeff Garzik

On 01/08/2013 01:16 PM, Joshua Coombs wrote:

Add a call to the IDE LED Trigger within the Marvell SATA driver to allow
Marvell SoC devices to show SATA activity via GPIO connected LEDs.

Signed-off-by: Joshua Coombs 
---
  drivers/ata/sata_mv.c | 3 +++
  drivers/leds/Kconfig  | 3 +--
  2 files changed, 4 insertions(+), 2 deletions(-)


NAK.  This is not appropriate at the specific driver level.  This would 
be better implemented at a higher level.




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


Re: [PATCH] Allow Marvell SATA driver to work with LEDS_TRIGGER_IDE_DISK

2013-01-09 Thread Jeff Garzik

On 01/08/2013 01:16 PM, Joshua Coombs wrote:

Add a call to the IDE LED Trigger within the Marvell SATA driver to allow
Marvell SoC devices to show SATA activity via GPIO connected LEDs.

Signed-off-by: Joshua Coombs josh.coo...@gmail.com
---
  drivers/ata/sata_mv.c | 3 +++
  drivers/leds/Kconfig  | 3 +--
  2 files changed, 4 insertions(+), 2 deletions(-)


NAK.  This is not appropriate at the specific driver level.  This would 
be better implemented at a higher level.




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


[git patches] libata updates for 3.8

2012-12-14 Thread Jeff Garzik

Please pull 72d5f2da2c3717f1be484d97e35d67dde0efb4c0 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ahci_platform.c|  46 ++---
 drivers/ata/ata_piix.c | 444 -
 drivers/ata/libahci.c  |   2 +-
 drivers/ata/libata-acpi.c  |   4 +
 drivers/ata/libata-core.c  |  31 ++-
 drivers/ata/libata-eh.c|   1 +
 drivers/ata/libata-scsi.c  |   6 +-
 drivers/ata/pata_arasan_cf.c   |   7 +-
 drivers/ata/pata_cmd64x.c  |   6 +-
 drivers/ata/pata_cs5536.c  |  32 ++-
 drivers/ata/pata_ep93xx.c  |   6 +-
 drivers/ata/pata_imx.c |   2 +-
 drivers/ata/pata_ixp4xx_cf.c   |  11 +-
 drivers/ata/pata_mpc52xx.c |  17 +-
 drivers/ata/pata_of_platform.c |   8 +-
 drivers/ata/pata_palmld.c  |   4 +-
 drivers/ata/pata_platform.c|  24 +--
 drivers/ata/pata_rdc.c |   3 -
 drivers/ata/sata_dwc_460ex.c   |   1 +
 drivers/ata/sata_highbank.c|  14 +-
 drivers/ata/sata_inic162x.c|   2 -
 drivers/ata/sata_promise.c |  15 +-
 drivers/ata/sata_sil24.c   |   4 -
 drivers/ata/sata_sx4.c |  14 +-
 include/linux/ata_platform.h   |   2 -
 include/linux/libata.h |   5 +
 26 files changed, 355 insertions(+), 356 deletions(-)
 mode change 100755 => 100644 drivers/ata/sata_dwc_460ex.c

Aaron Lu (2):
  libata: restore acpi disable functionality
  libata: set dma_mode to 0xff in reset

Bartlomiej Zolnierkiewicz (1):
  ata_piix: re-order code and remove prototypes

Brian Norris (16):
  ahci_platform: enable hotplug unbinding
  ahci_platform: convert to module_platform_driver
  ahci_platform: perform platform exit in host_stop() hook
  libata: implement ata_platform_remove_one()
  ahci_platform: utilize common ata_platform_remove_one()
  pata_ixp4xx_cf: utilize common ata_platform_remove_one()
  pata_mpc52xx: utilize common ata_platform_remove_one()
  pata_of_platform: utilize common ata_platform_remove_one()
  pata_platform: utilize common ata_platform_remove_one()
  pata_platform: remove unused remove function
  pata_palmld: utilize common ata_platform_remove_one()
  sata_highbank: utilize common ata_platform_remove_one()
  pata_octeon_cf: perform host detach, removal on exit
  libata: use pci_get_drvdata() helper
  pata_of_platform: fix compile error
  ahci_platform: make structs static

Christian Gmeiner (1):
  pata_cs5536: add quirk for broken udma

Jeff Garzik (3):
  Revert "libata: check SATA_SETTINGS log with HW Feature Ctrl"
  Revert "pata_octeon_cf: perform host detach, removal on exit"
  sata_dwc_460ex: remove file exec bit (chmod 0755 -> 0644)

Joe Perches (1):
  ata: Convert dev_printk(KERN_ to dev_(

Mikael Pettersson (1):
  sata_promise: fix hardreset lockdep error

Olaf Hering (1):
  ata_piix: reenable MS Virtual PC guests

Sergei Shtylyov (3):
  sata_sx4: pdc20621_{ata|host}_sg() do not need 'tf' parameter
  sata_highbank: use ATA_BUSY
  pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()

Shane Huang (1):
  libata: check SATA_SETTINGS log with HW Feature Ctrl

Wei Yongjun (6):
  pata_rdc: remove unused variable in rdc_init_one()
  sata_inic162x: remove unused variable in inic_scr_read()
  sata_sil24: remove unused variable from sata_sil24.c
  ARM: ep93xx: convert ata__printk() to ata__()
  pata_imx: convert ata_dev_printk() to ata_dev_info()
  ahci: convert ata_link_printk() to ata_link_warn()

Xiaotian Feng (1):
  [libata] fix Null pointer dereference on disk error

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b7078af..1cc467b 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -25,6 +25,8 @@
 #include 
 #include "ahci.h"
 
+static void ahci_host_stop(struct ata_host *host);
+
 enum ahci_type {
AHCI,   /* standard platform ahci */
IMX53_AHCI, /* ahci on i.mx53 */
@@ -47,6 +49,15 @@ static struct platform_device_id ahci_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, ahci_devtype);
 
+static struct ata_port_operations ahci_platform_ops = {
+   .inherits   = _ops,
+   .host_stop  = ahci_host_stop,
+};
+
+static struct ata_port_operations ahci_platform_retry_srst_ops = {
+   .inherits   = _pmp_retry_srst_ops,
+   .host_stop  = ahci_host_stop,
+};
 
 static const struct ata_port_info ahci_port_info[] = {
/* by features */
@@ -54,20 +65,20 @@ static const struct ata_port_info ahci_port_info[] = {
.flags  = AHCI_FLAG_COMMON,
.pio_mask   = ATA_PIO4,
.udma_mask  = ATA_UDMA6,
-   .port_ops   = _ops,
+   .port_ops   = _platform_ops,
},
[IMX53_AHCI] = {
  

Re: [PATCH] [libata] scsi: fix Null pointer dereference on disk error

2012-12-14 Thread Jeff Garzik

On 12/13/2012 03:12 AM, Xiaotian Feng wrote:

Following oops were observed when disk error happened:

[ 4272.896937] sd 0:0:0:0: [sda] Unhandled error code
[ 4272.896939] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK
[ 4272.896942] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 5a de a7 00 00 08 00
[ 4272.896951] end_request: I/O error, dev sda, sector 5955239
[ 4291.574947] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 4291.658305] IP: [] ahci_activity_show+0x1/0x40
[ 4291.730090] PGD 76dbbc067 PUD 6c4fba067 PMD 0
[ 4291.783408] Oops:  [#1] SMP
[ 4291.822100] last sysfs file: 
/sys/devices/pci:00/:00:1f.2/host0/target0:0:0/0:0:0:0/sw_activity
[ 4291.934235] CPU 9
[ 4291.958301] Pid: 27942, comm: hwinfo ..

ata_scsi_find_dev could return NULL, so ata_scsi_activity_{show,store} should 
check if atadev is NULL.

Signed-off-by: Xiaotian Feng 
Cc: Jeff Garzik 
Cc: James Bottomley 
Cc: sta...@kernel.org
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
  drivers/ata/libata-scsi.c |6 --
  1 file changed, 4 insertions(+), 2 deletions(-)


applied



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


Re: [PATCH] ata: uncomment ata_timing for XFER_PIO_SLOW

2012-12-14 Thread Jeff Garzik

On 12/14/2012 06:01 AM, Konstantin Khlebnikov wrote:

This patch uncomments ata timings for XFER_PIO_SLOW,
otherwise ata_timing_find_mode() returns NULL and kernel crashes in
pacpi_set_dmamode() after null-pointer dereference.

The same problem was mentioned recently in debug patch v3.7-rc5-72-gcd705d5
("libata debugging: Warn when unable to find timing descriptor based on 
xfer_mode")

I'm not sure about this patch, because I have no idea what this XFER_PIO_SLOW
means and why this bug so rare (3 times during 4 days boot-reboot test) I caught
this on completely ordinary PC with nvidia MCP61 chipset, sata hdd and ide 
dvd-rom.

Signed-off-by: Konstantin Khlebnikov 
Signed-off-by: Borislav Petkov 
Signed-off-by: Jeff Garzik 

---

Sep 27 13:48:23 buzz kernel: [   63.815060] ACPI: PCI Interrupt Link [APSI] 
enabled at IRQ 20
Sep 27 13:48:23 buzz kernel: [   63.987035] scsi0 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.072790] scsi1 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.127731] ata1: PATA max UDMA/133 cmd 0x9f0 
ctl 0xbf0 bmdma 0xcc00 irq 20
Sep 27 13:48:23 buzz kernel: [   64.127919] ata2: PATA max UDMA/133 cmd 0x970 
ctl 0xb70 bmdma 0xcc08 irq 20
Sep 27 13:48:23 buzz kernel: [   64.247630] ACPI: PCI Interrupt Link [APSJ] 
enabled at IRQ 23
Sep 27 13:48:23 buzz kernel: [   64.511669] scsi2 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.575269] [ cut here ]
Sep 27 13:48:23 buzz kernel: [   64.575269] WARNING: at 
drivers/ata/libata-core.c:2946 ata_timing_find_mode+0x5e/0x8a [libata]()
Sep 27 13:48:23 buzz kernel: [   64.575269] Hardware name: M52S-S3P
Sep 27 13:48:23 buzz kernel: [   64.575269] Modules linked in: ohci_hcd(+) 
pata_amd(+) pata_acpi(+) sata_nv(+) libata scsi_mod forcedeth ehci_hcd amd74
xx usbcore ide_pci_generic ide_core usb_common unix
Sep 27 13:48:23 buzz kernel: [   64.575269] Pid: 1785, comm: scsi_eh_0 Not 
tainted 3.6.0-rc7-next-20120926-00012-g872b7d8 #568
Sep 27 13:48:23 buzz kernel: [   64.575269] Call Trace:
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
warn_slowpath_common+0xc4/0xf2
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
warn_slowpath_null+0x28/0x31
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_timing_find_mode+0x5e/0x8a [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
pacpi_set_dmamode+0x45/0xc7 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
pacpi_qc_issue+0x7e/0xa1 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_qc_issue+0x45b/0x4c7 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
_raw_spin_lock_irqsave+0xdc/0xf8
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_exec_internal_sg+0xa2/0x5af [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_exec_internal_sg+0x28f/0x5af [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_exec_internal+0xa6/0xba [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
time_hardirqs_off+0x3b/0x47
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
local_clock+0x59/0x8c
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_do_dev_read_id+0x31/0x3a [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
mark_held_locks+0xa4/0xde
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_dev_read_id+0x12f/0x583 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_link_max_devices+0x14/0x45 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_eh_recover+0xa80/0x1871 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
local_clock+0x59/0x8c
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
spin_unlock_irqrestore+0x10/0x19 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_drain_fifo+0xb1/0xb1 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
pacpi_port_start+0xc0/0xc0 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
_raw_spin_unlock_irqrestore+0x7d/0xbc
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_do_eh+0x60/0xe3 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_drain_fifo+0xb1/0xb1 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
pacpi_port_start+0xc0/0xc0 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_sff_error_handler+0x13b/0x14f [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_bmdma_error_handler+0x175/0x185 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_scsi_port_error_handler+0x34d/0x832 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] ? 
scsi_eh_get_sense+0x21a/0x21a [scsi_mod]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [] 
ata_scsi_error+0xcc/0x11c [libata]
Sep 27 13:

Re: [PATCH] ata: uncomment ata_timing for XFER_PIO_SLOW

2012-12-14 Thread Jeff Garzik

On 12/14/2012 06:01 AM, Konstantin Khlebnikov wrote:

This patch uncomments ata timings for XFER_PIO_SLOW,
otherwise ata_timing_find_mode() returns NULL and kernel crashes in
pacpi_set_dmamode() after null-pointer dereference.

The same problem was mentioned recently in debug patch v3.7-rc5-72-gcd705d5
(libata debugging: Warn when unable to find timing descriptor based on 
xfer_mode)

I'm not sure about this patch, because I have no idea what this XFER_PIO_SLOW
means and why this bug so rare (3 times during 4 days boot-reboot test) I caught
this on completely ordinary PC with nvidia MCP61 chipset, sata hdd and ide 
dvd-rom.

Signed-off-by: Konstantin Khlebnikov khlebni...@openvz.org
Signed-off-by: Borislav Petkov b...@alien8.de
Signed-off-by: Jeff Garzik jgar...@redhat.com

---

Sep 27 13:48:23 buzz kernel: [   63.815060] ACPI: PCI Interrupt Link [APSI] 
enabled at IRQ 20
Sep 27 13:48:23 buzz kernel: [   63.987035] scsi0 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.072790] scsi1 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.127731] ata1: PATA max UDMA/133 cmd 0x9f0 
ctl 0xbf0 bmdma 0xcc00 irq 20
Sep 27 13:48:23 buzz kernel: [   64.127919] ata2: PATA max UDMA/133 cmd 0x970 
ctl 0xb70 bmdma 0xcc08 irq 20
Sep 27 13:48:23 buzz kernel: [   64.247630] ACPI: PCI Interrupt Link [APSJ] 
enabled at IRQ 23
Sep 27 13:48:23 buzz kernel: [   64.511669] scsi2 : pata_acpi
Sep 27 13:48:23 buzz kernel: [   64.575269] [ cut here ]
Sep 27 13:48:23 buzz kernel: [   64.575269] WARNING: at 
drivers/ata/libata-core.c:2946 ata_timing_find_mode+0x5e/0x8a [libata]()
Sep 27 13:48:23 buzz kernel: [   64.575269] Hardware name: M52S-S3P
Sep 27 13:48:23 buzz kernel: [   64.575269] Modules linked in: ohci_hcd(+) 
pata_amd(+) pata_acpi(+) sata_nv(+) libata scsi_mod forcedeth ehci_hcd amd74
xx usbcore ide_pci_generic ide_core usb_common unix
Sep 27 13:48:23 buzz kernel: [   64.575269] Pid: 1785, comm: scsi_eh_0 Not 
tainted 3.6.0-rc7-next-20120926-00012-g872b7d8 #568
Sep 27 13:48:23 buzz kernel: [   64.575269] Call Trace:
Sep 27 13:48:23 buzz kernel: [   64.575269]  [810760fa] 
warn_slowpath_common+0xc4/0xf2
Sep 27 13:48:23 buzz kernel: [   64.575269]  [81076150] 
warn_slowpath_null+0x28/0x31
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a028d1bf] 
ata_timing_find_mode+0x5e/0x8a [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a001e2e2] 
pacpi_set_dmamode+0x45/0xc7 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a001e469] 
pacpi_qc_issue+0x7e/0xa1 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a0290a71] 
ata_qc_issue+0x45b/0x4c7 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [816832e1] ? 
_raw_spin_lock_irqsave+0xdc/0xf8
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a0290b7f] ? 
ata_exec_internal_sg+0xa2/0x5af [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a0290d6c] 
ata_exec_internal_sg+0x28f/0x5af [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a0291132] 
ata_exec_internal+0xa6/0xba [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [8117bb60] ? 
time_hardirqs_off+0x3b/0x47
Sep 27 13:48:23 buzz kernel: [   64.575269]  [810c8e5a] ? 
local_clock+0x59/0x8c
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02911f1] 
ata_do_dev_read_id+0x31/0x3a [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [810f99d6] ? 
mark_held_locks+0xa4/0xde
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a0291329] 
ata_dev_read_id+0x12f/0x583 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a028c344] ? 
ata_link_max_devices+0x14/0x45 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a08cc] 
ata_eh_recover+0xa80/0x1871 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [810c8e5a] ? 
local_clock+0x59/0x8c
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a42d1] ? 
spin_unlock_irqrestore+0x10/0x19 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a4d7c] ? 
ata_sff_drain_fifo+0xb1/0xb1 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a5929] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a001e21c] ? 
pacpi_port_start+0xc0/0xc0 [pata_acpi]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [81684351] ? 
_raw_spin_unlock_irqrestore+0x7d/0xbc
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a5929] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a5929] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a2184] 
ata_do_eh+0x60/0xe3 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a4d7c] ? 
ata_sff_drain_fifo+0xb1/0xb1 [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a02a5929] ? 
ata_sff_wait_after_reset+0x18c/0x18c [libata]
Sep 27 13:48:23 buzz kernel: [   64.575269]  [a001e21c

Re: [PATCH] [libata] scsi: fix Null pointer dereference on disk error

2012-12-14 Thread Jeff Garzik

On 12/13/2012 03:12 AM, Xiaotian Feng wrote:

Following oops were observed when disk error happened:

[ 4272.896937] sd 0:0:0:0: [sda] Unhandled error code
[ 4272.896939] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET 
driverbyte=DRIVER_OK
[ 4272.896942] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 5a de a7 00 00 08 00
[ 4272.896951] end_request: I/O error, dev sda, sector 5955239
[ 4291.574947] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 4291.658305] IP: [] ahci_activity_show+0x1/0x40
[ 4291.730090] PGD 76dbbc067 PUD 6c4fba067 PMD 0
[ 4291.783408] Oops:  [#1] SMP
[ 4291.822100] last sysfs file: 
/sys/devices/pci:00/:00:1f.2/host0/target0:0:0/0:0:0:0/sw_activity
[ 4291.934235] CPU 9
[ 4291.958301] Pid: 27942, comm: hwinfo ..

ata_scsi_find_dev could return NULL, so ata_scsi_activity_{show,store} should 
check if atadev is NULL.

Signed-off-by: Xiaotian Feng dannyf...@tencent.com
Cc: Jeff Garzik jgar...@redhat.com
Cc: James Bottomley jbottom...@parallels.com
Cc: sta...@kernel.org
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
  drivers/ata/libata-scsi.c |6 --
  1 file changed, 4 insertions(+), 2 deletions(-)


applied



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


[git patches] libata updates for 3.8

2012-12-14 Thread Jeff Garzik

Please pull 72d5f2da2c3717f1be484d97e35d67dde0efb4c0 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ahci_platform.c|  46 ++---
 drivers/ata/ata_piix.c | 444 -
 drivers/ata/libahci.c  |   2 +-
 drivers/ata/libata-acpi.c  |   4 +
 drivers/ata/libata-core.c  |  31 ++-
 drivers/ata/libata-eh.c|   1 +
 drivers/ata/libata-scsi.c  |   6 +-
 drivers/ata/pata_arasan_cf.c   |   7 +-
 drivers/ata/pata_cmd64x.c  |   6 +-
 drivers/ata/pata_cs5536.c  |  32 ++-
 drivers/ata/pata_ep93xx.c  |   6 +-
 drivers/ata/pata_imx.c |   2 +-
 drivers/ata/pata_ixp4xx_cf.c   |  11 +-
 drivers/ata/pata_mpc52xx.c |  17 +-
 drivers/ata/pata_of_platform.c |   8 +-
 drivers/ata/pata_palmld.c  |   4 +-
 drivers/ata/pata_platform.c|  24 +--
 drivers/ata/pata_rdc.c |   3 -
 drivers/ata/sata_dwc_460ex.c   |   1 +
 drivers/ata/sata_highbank.c|  14 +-
 drivers/ata/sata_inic162x.c|   2 -
 drivers/ata/sata_promise.c |  15 +-
 drivers/ata/sata_sil24.c   |   4 -
 drivers/ata/sata_sx4.c |  14 +-
 include/linux/ata_platform.h   |   2 -
 include/linux/libata.h |   5 +
 26 files changed, 355 insertions(+), 356 deletions(-)
 mode change 100755 = 100644 drivers/ata/sata_dwc_460ex.c

Aaron Lu (2):
  libata: restore acpi disable functionality
  libata: set dma_mode to 0xff in reset

Bartlomiej Zolnierkiewicz (1):
  ata_piix: re-order code and remove prototypes

Brian Norris (16):
  ahci_platform: enable hotplug unbinding
  ahci_platform: convert to module_platform_driver
  ahci_platform: perform platform exit in host_stop() hook
  libata: implement ata_platform_remove_one()
  ahci_platform: utilize common ata_platform_remove_one()
  pata_ixp4xx_cf: utilize common ata_platform_remove_one()
  pata_mpc52xx: utilize common ata_platform_remove_one()
  pata_of_platform: utilize common ata_platform_remove_one()
  pata_platform: utilize common ata_platform_remove_one()
  pata_platform: remove unused remove function
  pata_palmld: utilize common ata_platform_remove_one()
  sata_highbank: utilize common ata_platform_remove_one()
  pata_octeon_cf: perform host detach, removal on exit
  libata: use pci_get_drvdata() helper
  pata_of_platform: fix compile error
  ahci_platform: make structs static

Christian Gmeiner (1):
  pata_cs5536: add quirk for broken udma

Jeff Garzik (3):
  Revert libata: check SATA_SETTINGS log with HW Feature Ctrl
  Revert pata_octeon_cf: perform host detach, removal on exit
  sata_dwc_460ex: remove file exec bit (chmod 0755 - 0644)

Joe Perches (1):
  ata: Convert dev_printk(KERN_LEVEL to dev_level(

Mikael Pettersson (1):
  sata_promise: fix hardreset lockdep error

Olaf Hering (1):
  ata_piix: reenable MS Virtual PC guests

Sergei Shtylyov (3):
  sata_sx4: pdc20621_{ata|host}_sg() do not need 'tf' parameter
  sata_highbank: use ATA_BUSY
  pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start()

Shane Huang (1):
  libata: check SATA_SETTINGS log with HW Feature Ctrl

Wei Yongjun (6):
  pata_rdc: remove unused variable in rdc_init_one()
  sata_inic162x: remove unused variable in inic_scr_read()
  sata_sil24: remove unused variable from sata_sil24.c
  ARM: ep93xx: convert ata_foo_printk() to ata_foo_level()
  pata_imx: convert ata_dev_printk() to ata_dev_info()
  ahci: convert ata_link_printk() to ata_link_warn()

Xiaotian Feng (1):
  [libata] fix Null pointer dereference on disk error

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b7078af..1cc467b 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -25,6 +25,8 @@
 #include linux/ahci_platform.h
 #include ahci.h
 
+static void ahci_host_stop(struct ata_host *host);
+
 enum ahci_type {
AHCI,   /* standard platform ahci */
IMX53_AHCI, /* ahci on i.mx53 */
@@ -47,6 +49,15 @@ static struct platform_device_id ahci_devtype[] = {
 };
 MODULE_DEVICE_TABLE(platform, ahci_devtype);
 
+static struct ata_port_operations ahci_platform_ops = {
+   .inherits   = ahci_ops,
+   .host_stop  = ahci_host_stop,
+};
+
+static struct ata_port_operations ahci_platform_retry_srst_ops = {
+   .inherits   = ahci_pmp_retry_srst_ops,
+   .host_stop  = ahci_host_stop,
+};
 
 static const struct ata_port_info ahci_port_info[] = {
/* by features */
@@ -54,20 +65,20 @@ static const struct ata_port_info ahci_port_info[] = {
.flags  = AHCI_FLAG_COMMON,
.pio_mask   = ATA_PIO4,
.udma_mask  = ATA_UDMA6,
-   .port_ops   = ahci_ops,
+   .port_ops   = ahci_platform_ops,
},
[IMX53_AHCI

Re: [PATCH] ata_piix: re-oder code and remove prototypes

2012-12-03 Thread Jeff Garzik

On 12/03/2012 02:29 PM, Sergei Shtylyov wrote:

Hello.

On 11/30/2012 01:56 PM, Bartlomiej Zolnierkiewicz wrote:


From: Bartlomiej Zolnierkiewicz 
Subject: [PATCH] ata_piix: re-oder code and remove prototypes


You meant "re-order", I think.


Signed-off-by: Bartlomiej Zolnierkiewicz 
Signed-off-by: Kyungmin Park 
---
Jeff, please apply.  Thanks!


Perhaps Jeff can correct the typo too...


Yep, corrected and results in libata-dev.git already



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


Re: [PATCH v4 -tip 3/3] AHCI: Support multiple MSIs

2012-12-03 Thread Jeff Garzik

On 11/19/2012 10:02 AM, Alexander Gordeev wrote:

Take advantage of multiple MSIs implementation on x86 - on systems with
IRQ remapping AHCI ports not only get assigned separate MSI vectors -
but also separate IRQs. As result, interrupts generated by different
ports could be serviced on different CPUs rather than on a single one.

In cases when number of allocated MSIs is less than requested the Sharing
Last MSI mode does not get used, no matter implemented in hardware or not.
Instead, the driver assumes the advantage of multiple MSIs is negated and
falls back to the single MSI mode as if MRSM bit was set (some Intel chips
implement this strategy anyway - MRSM bit gets set even if the number of
allocated MSIs exceeds the number of implemented ports).

Signed-off-by: Alexander Gordeev 
---
  drivers/ata/ahci.c|   93 +--
  drivers/ata/ahci.h|6 +++
  drivers/ata/libahci.c |  118 ++---
  3 files changed, 207 insertions(+), 10 deletions(-)


Acked-by: Jeff Garzik 



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


Re: [PATCH] ata_piix: re-oder code and remove prototypes

2012-12-03 Thread Jeff Garzik

On 11/30/2012 05:56 AM, Bartlomiej Zolnierkiewicz wrote:

From: Bartlomiej Zolnierkiewicz 
Subject: [PATCH] ata_piix: re-oder code and remove prototypes

Signed-off-by: Bartlomiej Zolnierkiewicz 
Signed-off-by: Kyungmin Park 
---
Jeff, please apply.  Thanks!

  drivers/ata/ata_piix.c |  419 
+++--
  1 file changed, 198 insertions(+), 221 deletions(-)


applied



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


Re: [PATCH] ata_piix: re-oder code and remove prototypes

2012-12-03 Thread Jeff Garzik

On 11/30/2012 05:56 AM, Bartlomiej Zolnierkiewicz wrote:

From: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
Subject: [PATCH] ata_piix: re-oder code and remove prototypes

Signed-off-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
---
Jeff, please apply.  Thanks!

  drivers/ata/ata_piix.c |  419 
+++--
  1 file changed, 198 insertions(+), 221 deletions(-)


applied



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


Re: [PATCH v4 -tip 3/3] AHCI: Support multiple MSIs

2012-12-03 Thread Jeff Garzik

On 11/19/2012 10:02 AM, Alexander Gordeev wrote:

Take advantage of multiple MSIs implementation on x86 - on systems with
IRQ remapping AHCI ports not only get assigned separate MSI vectors -
but also separate IRQs. As result, interrupts generated by different
ports could be serviced on different CPUs rather than on a single one.

In cases when number of allocated MSIs is less than requested the Sharing
Last MSI mode does not get used, no matter implemented in hardware or not.
Instead, the driver assumes the advantage of multiple MSIs is negated and
falls back to the single MSI mode as if MRSM bit was set (some Intel chips
implement this strategy anyway - MRSM bit gets set even if the number of
allocated MSIs exceeds the number of implemented ports).

Signed-off-by: Alexander Gordeev agord...@redhat.com
---
  drivers/ata/ahci.c|   93 +--
  drivers/ata/ahci.h|6 +++
  drivers/ata/libahci.c |  118 ++---
  3 files changed, 207 insertions(+), 10 deletions(-)


Acked-by: Jeff Garzik jgar...@redhat.com



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


Re: [PATCH] ata_piix: re-oder code and remove prototypes

2012-12-03 Thread Jeff Garzik

On 12/03/2012 02:29 PM, Sergei Shtylyov wrote:

Hello.

On 11/30/2012 01:56 PM, Bartlomiej Zolnierkiewicz wrote:


From: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
Subject: [PATCH] ata_piix: re-oder code and remove prototypes


You meant re-order, I think.


Signed-off-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com
Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
---
Jeff, please apply.  Thanks!


Perhaps Jeff can correct the typo too...


Yep, corrected and results in libata-dev.git already



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


Re: [PATCH] ata_piix: reenable MS Virtual PC guests

2012-11-28 Thread Jeff Garzik

On 09/18/2012 11:48 AM, Olaf Hering wrote:

An earlier commit cd006086fa5d91414d8ff9ff2b78fbb593878e3c ("ata_piix:
defer disks to the Hyper-V drivers by default") broke MS Virtual PC
guests. Hyper-V guests and Virtual PC guests have nearly identical DMI
info. As a result the driver does currently ignore the emulated hardware
in Virtual PC guests and defers the handling to hv_blkvsc. Since Virtual
PC does not offer paravirtualized drivers no disks will be found in the
guest.

One difference in the DMI info is the product version. This patch adds a
match for MS Virtual PC 2007 and "unignores" the emulated hardware.

This was reported for openSuSE 12.1 in bugzilla:
https://bugzilla.novell.com/show_bug.cgi?id=737532

Here is a detailed list of DMI info from example guests:

hwinfo --bios:

virtual pc guest:

   System Info: #1
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "VS2005R2"
 Serial: "3178-9905-1533-4840-9282-0569-59"
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "5.0"
 Serial: "3178-9905-1533-4840-9282-0569-59"
   Chassis Info: #3
 Manufacturer: "Microsoft Corporation"
 Version: "5.0"
 Serial: "3178-9905-1533-4840-9282-0569-59"
 Asset Tag: "7188-3705-6309-9738-9645-0364-00"
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

win2k8 guest:

   System Info: #1
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "7.0"
 Serial: "9106-3420-9819-5495-1514-2075-48"
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "7.0"
 Serial: "9106-3420-9819-5495-1514-2075-48"
   Chassis Info: #3
 Manufacturer: "Microsoft Corporation"
 Version: "7.0"
 Serial: "9106-3420-9819-5495-1514-2075-48"
 Asset Tag: "7076-9522-6699-1042-9501-1785-77"
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

win2k12 guest:

   System Info: #1
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "7.0"
 Serial: "8179-1954-0187-0085-3868-2270-14"
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: "Microsoft Corporation"
 Product: "Virtual Machine"
 Version: "7.0"
 Serial: "8179-1954-0187-0085-3868-2270-14"
   Chassis Info: #3
 Manufacturer: "Microsoft Corporation"
 Version: "7.0"
 Serial: "8179-1954-0187-0085-3868-2270-14"
 Asset Tag: "8374-0485-4557-6331-0620-5845-25"
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

Signed-off-by: Olaf Hering 


applied.  Apologies for missing this one.  It was accidentally shifting 
into the low-priority pile.




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


Re: [PATCH 02/16] ata: Convert dev_printk(KERN_ to dev_(

2012-11-28 Thread Jeff Garzik

On 10/28/2012 04:05 AM, Joe Perches wrote:

dev_ calls take less code than dev_printk(KERN_
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches 
---
  drivers/ata/pata_cmd64x.c |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


applied



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


Re: [PATCH 02/16] ata: Convert dev_printk(KERN_LEVEL to dev_level(

2012-11-28 Thread Jeff Garzik

On 10/28/2012 04:05 AM, Joe Perches wrote:

dev_level calls take less code than dev_printk(KERN_LEVEL
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches j...@perches.com
---
  drivers/ata/pata_cmd64x.c |6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


applied



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


Re: [PATCH] ata_piix: reenable MS Virtual PC guests

2012-11-28 Thread Jeff Garzik

On 09/18/2012 11:48 AM, Olaf Hering wrote:

An earlier commit cd006086fa5d91414d8ff9ff2b78fbb593878e3c (ata_piix:
defer disks to the Hyper-V drivers by default) broke MS Virtual PC
guests. Hyper-V guests and Virtual PC guests have nearly identical DMI
info. As a result the driver does currently ignore the emulated hardware
in Virtual PC guests and defers the handling to hv_blkvsc. Since Virtual
PC does not offer paravirtualized drivers no disks will be found in the
guest.

One difference in the DMI info is the product version. This patch adds a
match for MS Virtual PC 2007 and unignores the emulated hardware.

This was reported for openSuSE 12.1 in bugzilla:
https://bugzilla.novell.com/show_bug.cgi?id=737532

Here is a detailed list of DMI info from example guests:

hwinfo --bios:

virtual pc guest:

   System Info: #1
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: VS2005R2
 Serial: 3178-9905-1533-4840-9282-0569-59
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: 5.0
 Serial: 3178-9905-1533-4840-9282-0569-59
   Chassis Info: #3
 Manufacturer: Microsoft Corporation
 Version: 5.0
 Serial: 3178-9905-1533-4840-9282-0569-59
 Asset Tag: 7188-3705-6309-9738-9645-0364-00
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

win2k8 guest:

   System Info: #1
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: 7.0
 Serial: 9106-3420-9819-5495-1514-2075-48
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: 7.0
 Serial: 9106-3420-9819-5495-1514-2075-48
   Chassis Info: #3
 Manufacturer: Microsoft Corporation
 Version: 7.0
 Serial: 9106-3420-9819-5495-1514-2075-48
 Asset Tag: 7076-9522-6699-1042-9501-1785-77
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

win2k12 guest:

   System Info: #1
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: 7.0
 Serial: 8179-1954-0187-0085-3868-2270-14
 UUID: undefined, but settable
 Wake-up: 0x06 (Power Switch)
   Board Info: #2
 Manufacturer: Microsoft Corporation
 Product: Virtual Machine
 Version: 7.0
 Serial: 8179-1954-0187-0085-3868-2270-14
   Chassis Info: #3
 Manufacturer: Microsoft Corporation
 Version: 7.0
 Serial: 8179-1954-0187-0085-3868-2270-14
 Asset Tag: 8374-0485-4557-6331-0620-5845-25
 Type: 0x03 (Desktop)
 Bootup State: 0x03 (Safe)
 Power Supply State: 0x03 (Safe)
 Thermal State: 0x01 (Other)
 Security Status: 0x01 (Other)

Signed-off-by: Olaf Hering o...@aepfle.de


applied.  Apologies for missing this one.  It was accidentally shifting 
into the low-priority pile.




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


[git patches] libata fixes

2012-11-16 Thread Jeff Garzik

If you were going to shoot me for not sending these earlier, you would be
right.  -rc6 beat me by ~2 hours it seems, and they really should have
gone out to libata-dev.git and you long before that.

These have been in libata-dev.git for a day or so (unfortunately
linux-next is on vacation).  The main one is #1, with the others being
minor bits.  #1 has multiple tested-by, and can be considered a
regression fix IMO.

1) Fix ACPI oops, https://bugzilla.kernel.org/show_bug.cgi?id=48211

2) Temporary WARN_ONCE() debugging patch for further ACPI debugging.
   The code already oopses here, and so this merely gives slightly
   better info.  Related to https://bugzilla.kernel.org/show_bug.cgi?id=49151
   which has been bisected down to a patch that _exposes_ a latent bug,
   but said bisection target does not actually appear to be the root cause
   itself.

3) sata_svw: fix longstanding error recovery bug, which was
   preventing kdump, by adding missing DMA-start bit check.  Core
   code was already checking DMA-start, but ancillary, less-used
   routines were not.  Fixed.

4) sata_highbank: fix minor __init/__devinit warning

5) Fix minor warning, if CONFIG_PM is set, but CONFIG_PM_SLEEP is not set

6) pata_arasan: proper functioning requires clock setting

Please pull 29448ec129c5c9c7ece2ef28c72a0dafd70c8af2 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ahci_platform.c  |  2 +-
 drivers/ata/libata-acpi.c| 11 ---
 drivers/ata/libata-core.c|  4 
 drivers/ata/pata_arasan_cf.c |  8 +++-
 drivers/ata/sata_highbank.c  |  4 ++--
 drivers/ata/sata_svw.c   | 35 +++
 6 files changed, 57 insertions(+), 7 deletions(-)

Aaron Lu (1):
  libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle

Arnd Bergmann (1):
  sata_highbank: mark ahci_highbank_probe as __devinit

Borislav Petkov (1):
  libata debugging: Warn when unable to find timing descriptor based on 
xfer_mode

David Milburn (1):
  sata_svw: check DMA start bit before reset

Vipul Kumar Samar (1):
  pata_arasan: Initialize cf clock to 166MHz

Yuanhan Liu (1):
  [libata] PM callbacks should be conditionally compiled on CONFIG_PM_SLEEP

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b1ae480..b7078af 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device 
*pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int ahci_suspend(struct device *dev)
 {
struct ahci_platform_data *pdata = dev_get_platdata(dev);
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index fd9ecf7..5b0ba3f 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, 
struct scsi_device *sdev,
struct acpi_device *acpi_dev;
struct acpi_device_power_state *states;
 
-   if (ap->flags & ATA_FLAG_ACPI_SATA)
-   ata_dev = >link.device[sdev->channel];
-   else
+   if (ap->flags & ATA_FLAG_ACPI_SATA) {
+   if (!sata_pmp_attached(ap))
+   ata_dev = >link.device[sdev->id];
+   else
+   ata_dev = >pmp_link[sdev->channel].device[sdev->id];
+   }
+   else {
ata_dev = >link.device[sdev->id];
+   }
 
*handle = ata_dev_acpi_handle(ata_dev);
 
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3cc7096..f46fbd3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2942,6 +2942,10 @@ const struct ata_timing *ata_timing_find_mode(u8 
xfer_mode)
 
if (xfer_mode == t->mode)
return t;
+
+   WARN_ONCE(true, "%s: unable to find timing for xfer_mode 0x%x\n",
+   __func__, xfer_mode);
+
return NULL;
 }
 
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201eb..371fd2c 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
return ret;
}
 
+   ret = clk_set_rate(acdev->clk, 16600);
+   if (ret) {
+   dev_warn(acdev->host->dev, "clock set rate failed");
+   return ret;
+   }
+
spin_lock_irqsave(>host->lock, flags);
/* configure CF interface clock */
writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
@@ -908,7 +914,7 @@ static int __devexit arasan_cf_remove(struct 
platform_device *pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int arasan_cf_suspend(struct device *dev)
 {
struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 

Re: ata4.00: failed to get Identify Device Data, Emask 0x1

2012-11-16 Thread Jeff Garzik

On 11/16/2012 11:02 AM, Huang, Shane wrote:

I tried word 78 bit 5(Hardware Feature Control) which does not work,
it is 0 on my HDD sample with log 30h page 08h and DevSlp supported.

Seems that word 78 bit 5 is only the sufficient condition, not the
essential condition. Do you guys have suggestion?


Eventually I received the confirmation from the DevSlp HDD vendor,
bit 5 should be and will be set in production drives with log 30h
page 08h supported. So I will submit a patch to use it instead.


Hi Jeff,

I don't know when I will receive some production drives to verify
my patch, are you okay if I submit my patch first without testing
so as to meet kernel 3.7 bug fix window?


Yes, please do.

Jeff




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


Re: ata4.00: failed to get Identify Device Data, Emask 0x1

2012-11-16 Thread Jeff Garzik

On 11/16/2012 11:02 AM, Huang, Shane wrote:

I tried word 78 bit 5(Hardware Feature Control) which does not work,
it is 0 on my HDD sample with log 30h page 08h and DevSlp supported.

Seems that word 78 bit 5 is only the sufficient condition, not the
essential condition. Do you guys have suggestion?


Eventually I received the confirmation from the DevSlp HDD vendor,
bit 5 should be and will be set in production drives with log 30h
page 08h supported. So I will submit a patch to use it instead.


Hi Jeff,

I don't know when I will receive some production drives to verify
my patch, are you okay if I submit my patch first without testing
so as to meet kernel 3.7 bug fix window?


Yes, please do.

Jeff




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


[git patches] libata fixes

2012-11-16 Thread Jeff Garzik

If you were going to shoot me for not sending these earlier, you would be
right.  -rc6 beat me by ~2 hours it seems, and they really should have
gone out to libata-dev.git and you long before that.

These have been in libata-dev.git for a day or so (unfortunately
linux-next is on vacation).  The main one is #1, with the others being
minor bits.  #1 has multiple tested-by, and can be considered a
regression fix IMO.

1) Fix ACPI oops, https://bugzilla.kernel.org/show_bug.cgi?id=48211

2) Temporary WARN_ONCE() debugging patch for further ACPI debugging.
   The code already oopses here, and so this merely gives slightly
   better info.  Related to https://bugzilla.kernel.org/show_bug.cgi?id=49151
   which has been bisected down to a patch that _exposes_ a latent bug,
   but said bisection target does not actually appear to be the root cause
   itself.

3) sata_svw: fix longstanding error recovery bug, which was
   preventing kdump, by adding missing DMA-start bit check.  Core
   code was already checking DMA-start, but ancillary, less-used
   routines were not.  Fixed.

4) sata_highbank: fix minor __init/__devinit warning

5) Fix minor warning, if CONFIG_PM is set, but CONFIG_PM_SLEEP is not set

6) pata_arasan: proper functioning requires clock setting

Please pull 29448ec129c5c9c7ece2ef28c72a0dafd70c8af2 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git 
tags/upstream-linus


to receive the following updates:

 drivers/ata/ahci_platform.c  |  2 +-
 drivers/ata/libata-acpi.c| 11 ---
 drivers/ata/libata-core.c|  4 
 drivers/ata/pata_arasan_cf.c |  8 +++-
 drivers/ata/sata_highbank.c  |  4 ++--
 drivers/ata/sata_svw.c   | 35 +++
 6 files changed, 57 insertions(+), 7 deletions(-)

Aaron Lu (1):
  libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle

Arnd Bergmann (1):
  sata_highbank: mark ahci_highbank_probe as __devinit

Borislav Petkov (1):
  libata debugging: Warn when unable to find timing descriptor based on 
xfer_mode

David Milburn (1):
  sata_svw: check DMA start bit before reset

Vipul Kumar Samar (1):
  pata_arasan: Initialize cf clock to 166MHz

Yuanhan Liu (1):
  [libata] PM callbacks should be conditionally compiled on CONFIG_PM_SLEEP

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b1ae480..b7078af 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device 
*pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int ahci_suspend(struct device *dev)
 {
struct ahci_platform_data *pdata = dev_get_platdata(dev);
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index fd9ecf7..5b0ba3f 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, 
struct scsi_device *sdev,
struct acpi_device *acpi_dev;
struct acpi_device_power_state *states;
 
-   if (ap-flags  ATA_FLAG_ACPI_SATA)
-   ata_dev = ap-link.device[sdev-channel];
-   else
+   if (ap-flags  ATA_FLAG_ACPI_SATA) {
+   if (!sata_pmp_attached(ap))
+   ata_dev = ap-link.device[sdev-id];
+   else
+   ata_dev = ap-pmp_link[sdev-channel].device[sdev-id];
+   }
+   else {
ata_dev = ap-link.device[sdev-id];
+   }
 
*handle = ata_dev_acpi_handle(ata_dev);
 
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3cc7096..f46fbd3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2942,6 +2942,10 @@ const struct ata_timing *ata_timing_find_mode(u8 
xfer_mode)
 
if (xfer_mode == t-mode)
return t;
+
+   WARN_ONCE(true, %s: unable to find timing for xfer_mode 0x%x\n,
+   __func__, xfer_mode);
+
return NULL;
 }
 
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201eb..371fd2c 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
return ret;
}
 
+   ret = clk_set_rate(acdev-clk, 16600);
+   if (ret) {
+   dev_warn(acdev-host-dev, clock set rate failed);
+   return ret;
+   }
+
spin_lock_irqsave(acdev-host-lock, flags);
/* configure CF interface clock */
writel((pdata-cf_if_clk = CF_IF_CLK_200M) ? pdata-cf_if_clk :
@@ -908,7 +914,7 @@ static int __devexit arasan_cf_remove(struct 
platform_device *pdev)
return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int arasan_cf_suspend(struct device *dev)
 {
struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 

Re: [PATCH 1/5] ata: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-11-15 Thread Jeff Garzik

On 10/16/2012 10:59 AM, Yuanhan Liu wrote:

This will fix warnings like following when CONFIG_PM_SLEEP is not set:

 warning: 'xxx_suspend' defined but not used [-Wunused-function]
 warning: 'xxx_resume' defined but not used [-Wunused-function]

Because
SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)

Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM).

Cc: Jeff Garzik 
Cc: Viresh Kumar 
Cc: linux-...@vger.kernel.org
Signed-off-by: Yuanhan Liu 
Signed-off-by: Fengguang Wu 
---
  drivers/ata/ahci_platform.c  |2 +-
  drivers/ata/pata_arasan_cf.c |2 +-
  drivers/ata/sata_highbank.c  |2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)



applied



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


Re: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit

2012-11-15 Thread Jeff Garzik

On 11/06/2012 04:55 PM, Arnd Bergmann wrote:

The ahci_highbank_probe function is incorrectly marked as __init,
which means it can get discarded at boot time, which might be
a problem if for some reason the device only becomes operational
after loading another module.

Using __devinit instead avoids seeing this warning for every build:

WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the
variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe()
The variable ahci_highbank_driver references
the function __init ahci_highbank_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Arnd Bergmann 
Cc: Mark Langsdorf 
Cc: Rob Herring 
Cc: Jeff Garzik 
---
  drivers/ata/sata_highbank.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied


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


Re: [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz

2012-11-15 Thread Jeff Garzik

On 11/08/2012 10:09 AM, Viresh Kumar wrote:

From: Vipul Kumar Samar 

PATA arasan driver expects the clock to be set to 166 MHz for proper 
functioning.
This patch sets clk to 166 MHz in probe.

Signed-off-by: Vipul Kumar Samar 
Signed-off-by: Viresh Kumar 
---
  drivers/ata/pata_arasan_cf.c | 6 ++
  1 file changed, 6 insertions(+)


applied



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


Re: [patch,v3 06/10] ata: use scsi_host_alloc_node

2012-11-15 Thread Jeff Garzik

On 11/09/2012 02:18 PM, Jeff Moyer wrote:

Signed-off-by: Jeff Moyer 
---
  drivers/ata/libata-scsi.c |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


Acked-by: Jeff Garzik 



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


Re: [PATCH] pata_cs5536: add quirk for broken udma

2012-11-15 Thread Jeff Garzik

On 11/15/2012 05:03 PM, Christian Gmeiner wrote:

I am working on a device which uses the cs5536 pata driver. There
are some broken hardware revisions out in the field, which can be
detected via DMI. On older versions with an embedded BIOS I
used libata.dma=0 to disable dma completely.
Now we are switching to a coreboot/seabios based BIOS where we
have DMI support and so I think its a good idea to get rid of
all those hacky kernel parameters as the same image
is used other devices where libata.dma=0 is not a good idea.

Signed-off-by: Christian Gmeiner 
---
  drivers/ata/pata_cs5536.c | 32 ++
+-
  1 file changed, 31 insertions(+), 1 deletion(-)


ACK, but patch is word-wrapped-mangled



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


Re: [PATCH] pata_cs5536: add quirk for broken udma

2012-11-15 Thread Jeff Garzik

On 11/15/2012 05:03 PM, Christian Gmeiner wrote:

I am working on a device which uses the cs5536 pata driver. There
are some broken hardware revisions out in the field, which can be
detected via DMI. On older versions with an embedded BIOS I
used libata.dma=0 to disable dma completely.
Now we are switching to a coreboot/seabios based BIOS where we
have DMI support and so I think its a good idea to get rid of
all those hacky kernel parameters as the same image
is used other devices where libata.dma=0 is not a good idea.

Signed-off-by: Christian Gmeiner christian.gmei...@gmail.com
---
  drivers/ata/pata_cs5536.c | 32 ++
+-
  1 file changed, 31 insertions(+), 1 deletion(-)


ACK, but patch is word-wrapped-mangled



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


Re: [patch,v3 06/10] ata: use scsi_host_alloc_node

2012-11-15 Thread Jeff Garzik

On 11/09/2012 02:18 PM, Jeff Moyer wrote:

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


Acked-by: Jeff Garzik jgar...@redhat.com



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


Re: [PATCH] ata: pata_arasan: Initialize cf clock to 166MHz

2012-11-15 Thread Jeff Garzik

On 11/08/2012 10:09 AM, Viresh Kumar wrote:

From: Vipul Kumar Samar vipulkumar.sa...@st.com

PATA arasan driver expects the clock to be set to 166 MHz for proper 
functioning.
This patch sets clk to 166 MHz in probe.

Signed-off-by: Vipul Kumar Samar vipulkumar.sa...@st.com
Signed-off-by: Viresh Kumar viresh.ku...@linaro.org
---
  drivers/ata/pata_arasan_cf.c | 6 ++
  1 file changed, 6 insertions(+)


applied



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


Re: [PATCH 7/8] ata: highbank: mark ahci_highbank_probe as __devinit

2012-11-15 Thread Jeff Garzik

On 11/06/2012 04:55 PM, Arnd Bergmann wrote:

The ahci_highbank_probe function is incorrectly marked as __init,
which means it can get discarded at boot time, which might be
a problem if for some reason the device only becomes operational
after loading another module.

Using __devinit instead avoids seeing this warning for every build:

WARNING: vmlinux.o(.data+0xf7b0): Section mismatch in reference from the
variable ahci_highbank_driver to the function .init.text:ahci_highbank_probe()
The variable ahci_highbank_driver references
the function __init ahci_highbank_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Arnd Bergmann a...@arndb.de
Cc: Mark Langsdorf mark.langsd...@calxeda.com
Cc: Rob Herring rob.herr...@calxeda.com
Cc: Jeff Garzik jgar...@redhat.com
---
  drivers/ata/sata_highbank.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)


applied


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


Re: [PATCH 1/5] ata: suspend/resume callbacks should be conditionally compiled on CONFIG_PM_SLEEP

2012-11-15 Thread Jeff Garzik

On 10/16/2012 10:59 AM, Yuanhan Liu wrote:

This will fix warnings like following when CONFIG_PM_SLEEP is not set:

 warning: 'xxx_suspend' defined but not used [-Wunused-function]
 warning: 'xxx_resume' defined but not used [-Wunused-function]

Because
SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)

Only references the callbacks on CONFIG_PM_SLEEP (instead of CONFIG_PM).

Cc: Jeff Garzik jgar...@pobox.com
Cc: Viresh Kumar viresh.li...@gmail.com
Cc: linux-...@vger.kernel.org
Signed-off-by: Yuanhan Liu yuanhan@linux.intel.com
Signed-off-by: Fengguang Wu fengguang...@intel.com
---
  drivers/ata/ahci_platform.c  |2 +-
  drivers/ata/pata_arasan_cf.c |2 +-
  drivers/ata/sata_highbank.c  |2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)



applied



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


Re: [PATCH 2/8] aoe: provide ATA identify device content to user on request

2012-11-08 Thread Jeff Garzik

On 11/08/2012 11:32 AM, Ed Cashin wrote:

This patch makes the aoe driver follow expected behavior when
the user uses ioctl to get the ATA device identify information.

Signed-off-by: Ed Cashin 
---
  drivers/block/aoe/aoe.h|1 +
  drivers/block/aoe/aoeblk.c |   30 ++
  drivers/block/aoe/aoecmd.c |   16 
  3 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index 536942b..f6e0c03 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -169,6 +169,7 @@ struct aoedev {
struct aoetgt *htgt;/* target needing rexmit assistance */
ulong ntargets;
ulong kicked;
+   char ident[512];
  };

  /* kthread tracking */
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 56736cd..7ba0fcf 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -17,6 +17,7 @@
  #include 
  #include 
  #include 
+#include 
  #include "aoe.h"

  static DEFINE_MUTEX(aoeblk_mutex);
@@ -212,9 +213,38 @@ aoeblk_getgeo(struct block_device *bdev, struct 
hd_geometry *geo)
return 0;
  }

+static int
+aoeblk_ioctl(struct block_device *bdev, fmode_t mode, uint cmd, ulong arg)
+{
+   struct aoedev *d;
+
+   if (!arg)
+   return -EINVAL;
+
+   d = bdev->bd_disk->private_data;
+   if ((d->flags & DEVFL_UP) == 0) {
+   pr_err("aoe: disk not up\n");
+   return -ENODEV;
+   }
+
+   if (cmd == HDIO_GET_IDENTITY) {
+   if (!copy_to_user((void __user *) arg, >ident,
+   sizeof(d->ident)))
+   return 0;
+   return -EFAULT;
+   }
+
+   /* udev calls scsi_id, which uses SG_IO, resulting in noise */
+   if (cmd != SG_IO)
+   pr_info("aoe: unknown ioctl 0x%x\n", cmd);
+
+   return -ENOTTY;
+}
+
  static const struct block_device_operations aoe_bdops = {
.open = aoeblk_open,
.release = aoeblk_release,
+   .ioctl = aoeblk_ioctl,
.getgeo = aoeblk_getgeo,
.owner = THIS_MODULE,
  };
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 3ce01f6..c4ff70b 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -799,6 +799,17 @@ aoecmd_sleepwork(struct work_struct *work)
  }

  static void
+ata_ident_fixstring(u16 *id, int ns)
+{
+   u16 s;
+
+   while (ns-- > 0) {
+   s = *id;
+   *id++ = s >> 8 | s << 8;
+   }
+}
+
+static void
  ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id)
  {
u64 ssize;
@@ -833,6 +844,11 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, 
unsigned char *id)
d->geo.sectors = get_unaligned_le16([56 << 1]);
}

+   ata_ident_fixstring((u16 *) [10<<1], 10);  /* serial */
+   ata_ident_fixstring((u16 *) [23<<1], 4);   /* firmware */
+   ata_ident_fixstring((u16 *) [27<<1], 20);  /* model */


This duplicates ata_id_string() and/or ata_id_c_string(), does it not?



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


Re: [PATCH 2/8] aoe: provide ATA identify device content to user on request

2012-11-08 Thread Jeff Garzik

On 11/08/2012 11:32 AM, Ed Cashin wrote:

This patch makes the aoe driver follow expected behavior when
the user uses ioctl to get the ATA device identify information.

Signed-off-by: Ed Cashin ecas...@coraid.com
---
  drivers/block/aoe/aoe.h|1 +
  drivers/block/aoe/aoeblk.c |   30 ++
  drivers/block/aoe/aoecmd.c |   16 
  3 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h
index 536942b..f6e0c03 100644
--- a/drivers/block/aoe/aoe.h
+++ b/drivers/block/aoe/aoe.h
@@ -169,6 +169,7 @@ struct aoedev {
struct aoetgt *htgt;/* target needing rexmit assistance */
ulong ntargets;
ulong kicked;
+   char ident[512];
  };

  /* kthread tracking */
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 56736cd..7ba0fcf 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -17,6 +17,7 @@
  #include linux/mutex.h
  #include linux/export.h
  #include linux/moduleparam.h
+#include scsi/sg.h
  #include aoe.h

  static DEFINE_MUTEX(aoeblk_mutex);
@@ -212,9 +213,38 @@ aoeblk_getgeo(struct block_device *bdev, struct 
hd_geometry *geo)
return 0;
  }

+static int
+aoeblk_ioctl(struct block_device *bdev, fmode_t mode, uint cmd, ulong arg)
+{
+   struct aoedev *d;
+
+   if (!arg)
+   return -EINVAL;
+
+   d = bdev-bd_disk-private_data;
+   if ((d-flags  DEVFL_UP) == 0) {
+   pr_err(aoe: disk not up\n);
+   return -ENODEV;
+   }
+
+   if (cmd == HDIO_GET_IDENTITY) {
+   if (!copy_to_user((void __user *) arg, d-ident,
+   sizeof(d-ident)))
+   return 0;
+   return -EFAULT;
+   }
+
+   /* udev calls scsi_id, which uses SG_IO, resulting in noise */
+   if (cmd != SG_IO)
+   pr_info(aoe: unknown ioctl 0x%x\n, cmd);
+
+   return -ENOTTY;
+}
+
  static const struct block_device_operations aoe_bdops = {
.open = aoeblk_open,
.release = aoeblk_release,
+   .ioctl = aoeblk_ioctl,
.getgeo = aoeblk_getgeo,
.owner = THIS_MODULE,
  };
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 3ce01f6..c4ff70b 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -799,6 +799,17 @@ aoecmd_sleepwork(struct work_struct *work)
  }

  static void
+ata_ident_fixstring(u16 *id, int ns)
+{
+   u16 s;
+
+   while (ns--  0) {
+   s = *id;
+   *id++ = s  8 | s  8;
+   }
+}
+
+static void
  ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id)
  {
u64 ssize;
@@ -833,6 +844,11 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, 
unsigned char *id)
d-geo.sectors = get_unaligned_le16(id[56  1]);
}

+   ata_ident_fixstring((u16 *) id[101], 10);  /* serial */
+   ata_ident_fixstring((u16 *) id[231], 4);   /* firmware */
+   ata_ident_fixstring((u16 *) id[271], 20);  /* model */


This duplicates ata_id_string() and/or ata_id_c_string(), does it not?



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


Re: [PATCH v0] Add SHA-3 hash algorithm

2012-10-03 Thread Jeff Garzik

On 10/03/2012 03:11 AM, Herbert Xu wrote:

On Wed, Oct 03, 2012 at 02:53:27AM -0400, Jeff Garzik wrote:


Maybe my patch is the best we can do in the current kernel, if
dynamic digest size is not currently possible. Register "sha3_224",
"sha3_256", ... as you describe, and wait for actual users to appear
with unsupported digest sizes.


Let's see what people use before we do anything more fancy.

If the variants really start proliferating, we can add a template
called "trunc" and then have things like "trunc(sha3,224)", etc.


If they start proliferating, you really just want a single "sha3(n)", 
one single shash_alg registered at driver init time.


Jeff




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


Re: [PATCH v0] Add SHA-3 hash algorithm

2012-10-03 Thread Jeff Garzik

On 10/03/2012 02:06 AM, David Miller wrote:

From: Jeff Garzik 
Date: Wed, 3 Oct 2012 01:45:42 -0400


1) tcrypt setup blatantly wrong.  What is the best setup here?  Define a
separate entry for each digest length?  Is there some special string
descriptor format that is desired, like "sha3-256" or "sha3(256)"?


Good question.  The base name should probably be something without
dashes.  Maybe "sha3_256", but yeah "sha3256" would look rediculous.


Well, the more basic question was...  what to do when the digest length 
is easily variable, vis a vis kernel hash APIs?


Keccak message digest size may fall anywhere within the range 8 bits - 
1600 bits at runtime.  You choose the digest size when you init the 
context.  In contrast, the kernel interface appears to require a 
hardcoded size, chosen at driver compile time.


My patch picks sizes found in common use, consistent with existing 
kernel practice.  However, it is valid for another Keccak user to 
produce a 1600 bit hash, or a 1592 bit hash, or a 1584 bit hash, etc., etc.


Maybe my patch is the best we can do in the current kernel, if dynamic 
digest size is not currently possible. Register "sha3_224", "sha3_256", 
... as you describe, and wait for actual users to appear with 
unsupported digest sizes.


Jeff



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


Re: [PATCH v0] Add SHA-3 hash algorithm

2012-10-03 Thread Jeff Garzik

On 10/03/2012 02:06 AM, David Miller wrote:

From: Jeff Garzik j...@garzik.org
Date: Wed, 3 Oct 2012 01:45:42 -0400


1) tcrypt setup blatantly wrong.  What is the best setup here?  Define a
separate entry for each digest length?  Is there some special string
descriptor format that is desired, like sha3-256 or sha3(256)?


Good question.  The base name should probably be something without
dashes.  Maybe sha3_256, but yeah sha3256 would look rediculous.


Well, the more basic question was...  what to do when the digest length 
is easily variable, vis a vis kernel hash APIs?


Keccak message digest size may fall anywhere within the range 8 bits - 
1600 bits at runtime.  You choose the digest size when you init the 
context.  In contrast, the kernel interface appears to require a 
hardcoded size, chosen at driver compile time.


My patch picks sizes found in common use, consistent with existing 
kernel practice.  However, it is valid for another Keccak user to 
produce a 1600 bit hash, or a 1592 bit hash, or a 1584 bit hash, etc., etc.


Maybe my patch is the best we can do in the current kernel, if dynamic 
digest size is not currently possible. Register sha3_224, sha3_256, 
... as you describe, and wait for actual users to appear with 
unsupported digest sizes.


Jeff



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


Re: [PATCH v0] Add SHA-3 hash algorithm

2012-10-03 Thread Jeff Garzik

On 10/03/2012 03:11 AM, Herbert Xu wrote:

On Wed, Oct 03, 2012 at 02:53:27AM -0400, Jeff Garzik wrote:


Maybe my patch is the best we can do in the current kernel, if
dynamic digest size is not currently possible. Register sha3_224,
sha3_256, ... as you describe, and wait for actual users to appear
with unsupported digest sizes.


Let's see what people use before we do anything more fancy.

If the variants really start proliferating, we can add a template
called trunc and then have things like trunc(sha3,224), etc.


If they start proliferating, you really just want a single sha3(n), 
one single shash_alg registered at driver init time.


Jeff




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


[PATCH v0] Add SHA-3 hash algorithm

2012-10-02 Thread Jeff Garzik

Whee -- SHA-3 is out!   I wanted to explore the new toy a bit, and
so, here is a blatantly untested rough draft of SHA-3 kernel support.

Why rough draft?  Because answers to the questions below will inform a
more polished version.

Code notes and questions:

1) tcrypt setup blatantly wrong.  What is the best setup here?  Define a
separate entry for each digest length?  Is there some special string
descriptor format that is desired, like "sha3-256" or "sha3(256)"?

2) Digest and block size are easily variable, as shown below...
do we want hand-craft individual versions for each -- sha3_256.c,
sha3_512.c, etc.?

3) Is it even feasible for struct shash_alg to have a dynamic (filled in
at context init time, not driver registration time) digestsize and
cra_blocksize?  That would permit a single shash_alg for all sha3.

4) Original implementation from readable_keccak.tgz (link below).  The
official sources have a bazillion different flavors for various
architectures and bit sizes, and the code is not pretty.  I wanted to
start small and readable, and _then_ branch out into x86[-64]-specific
versions, etc. as users and use cases appear.



Commit e52113b7b4ace50ab586b426098c6d69d75c263a
Branch sha3
Repo git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/linux.git

References:
http://keccak.noekeon.org/
http://www.mjos.fi/dist/readable_keccak.tgz
http://www.nist.gov/itl/csd/sha-100212.cfm

Not-signed-off-by: Jeff Garzik 

 crypto/Kconfig|6 +
 crypto/Makefile   |1 
 crypto/sha3_generic.c |  280 ++
 crypto/tcrypt.c   |   14 ++
 include/crypto/sha3.h |   26 
 5 files changed, 326 insertions(+), 1 deletion(-)

diff --git a/crypto/Kconfig b/crypto/Kconfig
index a323805..97f5e75 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -457,6 +457,12 @@ config CRYPTO_SHA512
  This code also includes SHA-384, a 384 bit hash with 192 bits
  of security against collision attacks.
 
+config CRYPTO_SHA3
+   tristate "SHA3 digest algorithm"
+   select CRYPTO_HASH
+   help
+ SHA-3 secure hash standard.
+
 config CRYPTO_TGR192
tristate "Tiger digest algorithms"
select CRYPTO_HASH
diff --git a/crypto/Makefile b/crypto/Makefile
index 30f33d6..65150d1 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -45,6 +45,7 @@ obj-$(CONFIG_CRYPTO_RMD320) += rmd320.o
 obj-$(CONFIG_CRYPTO_SHA1) += sha1_generic.o
 obj-$(CONFIG_CRYPTO_SHA256) += sha256_generic.o
 obj-$(CONFIG_CRYPTO_SHA512) += sha512_generic.o
+obj-$(CONFIG_CRYPTO_SHA3) += sha3_generic.o
 obj-$(CONFIG_CRYPTO_WP512) += wp512.o
 obj-$(CONFIG_CRYPTO_TGR192) += tgr192.o
 obj-$(CONFIG_CRYPTO_GF128MUL) += gf128mul.o
diff --git a/crypto/sha3_generic.c b/crypto/sha3_generic.c
new file mode 100644
index 000..9255ea1
--- /dev/null
+++ b/crypto/sha3_generic.c
@@ -0,0 +1,280 @@
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define KECCAK_ROUNDS 24
+
+#define ROTL64(x, y) (((x) << (y)) | ((x) >> (64 - (y
+
+static const u64 keccakf_rndc[24] = 
+{
+   0x0001, 0x8082, 0x8000808a,
+   0x800080008000, 0x808b, 0x8001,
+   0x800080008081, 0x80008009, 0x008a,
+   0x0088, 0x80008009, 0x800a,
+   0x8000808b, 0x808b, 0x80008089,
+   0x80008003, 0x80008002, 0x8080, 
+   0x800a, 0x8000800a, 0x800080008081,
+   0x80008080, 0x8001, 0x800080008008
+};
+
+static const int keccakf_rotc[24] = 
+{
+   1,  3,  6,  10, 15, 21, 28, 36, 45, 55, 2,  14, 
+   27, 41, 56, 8,  25, 43, 62, 18, 39, 61, 20, 44
+};
+
+static const int keccakf_piln[24] = 
+{
+   10, 7,  11, 17, 18, 3, 5,  16, 8,  21, 24, 4, 
+   15, 23, 19, 13, 12, 2, 20, 14, 22, 9,  6,  1 
+};
+
+// update the state with given number of rounds
+
+static void keccakf(u64 st[25], int rounds)
+{
+   int i, j, round;
+   u64 t, bc[5];
+
+   for (round = 0; round < rounds; round++) {
+
+   // Theta
+   for (i = 0; i < 5; i++)  
+   bc[i] = st[i] ^ st[i + 5] ^ st[i + 10] ^ st[i + 15] ^ 
st[i + 20];
+
+   for (i = 0; i < 5; i++) {
+   t = bc[(i + 4) % 5] ^ ROTL64(bc[(i + 1) % 5], 1);
+   for (j = 0; j < 25; j += 5)
+   st[j + i] ^= t;
+   }
+
+   // Rho Pi
+   t = st[1];
+   for (i = 0; i < 24; i++) {
+   j = keccakf_piln[i];
+   bc[0] = st[j];
+   st[j] = ROTL64(t, keccakf_rotc[i]);
+   t = bc[0];
+   }
+
+   //  Chi
+   for (j 

Re: [git patches] libata fixes for 3.7

2012-10-02 Thread Jeff Garzik

On 10/02/2012 03:44 PM, Michael Tokarev wrote:

On 02.10.2012 23:40, Jeff Garzik wrote:


Minor libata updates, nothing notable.

1) Apply -- and then revert -- the FUA feature.  Caused
disk corruption in linux-next, proving it cannot be turned on by
default.


Any details on that?  Disk corruprion is rather a nasty
side-effect indeed.


One thread with reports is

Storage related regression in linux-next 20120824

Regards,

Jeff



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


[git patches] libata fixes for 3.7

2012-10-02 Thread Jeff Garzik
de 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -310,7 +311,7 @@ static int cf_init(struct arasan_cf_dev *acdev)
unsigned long flags;
int ret = 0;
 
-   ret = clk_enable(acdev->clk);
+   ret = clk_prepare_enable(acdev->clk);
if (ret) {
dev_dbg(acdev->host->dev, "clock enable failed");
return ret;
@@ -340,7 +341,7 @@ static void cf_exit(struct arasan_cf_dev *acdev)
writel(readl(acdev->vbase + OP_MODE) & ~CFHOST_ENB,
acdev->vbase + OP_MODE);
spin_unlock_irqrestore(>host->lock, flags);
-   clk_disable(acdev->clk);
+   clk_disable_unprepare(acdev->clk);
 }
 
 static void dma_callback(void *dev)
@@ -935,6 +936,14 @@ static int arasan_cf_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, 
arasan_cf_resume);
 
+#ifdef CONFIG_OF
+static const struct of_device_id arasan_cf_id_table[] = {
+   { .compatible = "arasan,cf-spear1340" },
+   {}
+};
+MODULE_DEVICE_TABLE(of, arasan_cf_id_table);
+#endif
+
 static struct platform_driver arasan_cf_driver = {
.probe  = arasan_cf_probe,
.remove = __devexit_p(arasan_cf_remove),
@@ -942,6 +951,7 @@ static struct platform_driver arasan_cf_driver = {
.name   = DRIVER_NAME,
.owner  = THIS_MODULE,
.pm = _cf_pm_ops,
+   .of_match_table = of_match_ptr(arasan_cf_id_table),
},
 };
 
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index d6577b9..124b2c1 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -123,6 +123,7 @@ enum {
ONLINE = (1 << 31),
GOING_OFFLINE = (1 << 30),
BIST_ERR = (1 << 29),
+   CLEAR_ERROR = (1 << 27),
 
FATAL_ERR_HC_MASTER_ERR = (1 << 18),
FATAL_ERR_PARITY_ERR_TX = (1 << 17),
@@ -143,6 +144,7 @@ enum {
FATAL_ERR_CRC_ERR_RX |
FATAL_ERR_FIFO_OVRFL_TX | FATAL_ERR_FIFO_OVRFL_RX,
 
+   INT_ON_DATA_LENGTH_MISMATCH = (1 << 12),
INT_ON_FATAL_ERR = (1 << 5),
INT_ON_PHYRDY_CHG = (1 << 4),
 
@@ -1181,25 +1183,54 @@ static void sata_fsl_host_intr(struct ata_port *ap)
u32 hstatus, done_mask = 0;
struct ata_queued_cmd *qc;
u32 SError;
+   u32 tag;
+   u32 status_mask = INT_ON_ERROR;
 
hstatus = ioread32(hcr_base + HSTATUS);
 
sata_fsl_scr_read(>link, SCR_ERROR, );
 
+   /* Read command completed register */
+   done_mask = ioread32(hcr_base + CC);
+
+   /* Workaround for data length mismatch errata */
+   if (unlikely(hstatus & INT_ON_DATA_LENGTH_MISMATCH)) {
+   for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
+   qc = ata_qc_from_tag(ap, tag);
+   if (qc && ata_is_atapi(qc->tf.protocol)) {
+   u32 hcontrol;
+   /* Set HControl[27] to clear error registers */
+   hcontrol = ioread32(hcr_base + HCONTROL);
+   iowrite32(hcontrol | CLEAR_ERROR,
+   hcr_base + HCONTROL);
+
+       /* Clear HControl[27] */
+   iowrite32(hcontrol & ~CLEAR_ERROR,
+   hcr_base + HCONTROL);
+
+   /* Clear SError[E] bit */
+   sata_fsl_scr_write(>link, SCR_ERROR,
+   SError);
+
+   /* Ignore fatal error and device error */
+   status_mask &= ~(INT_ON_SINGL_DEVICE_ERR
+   | INT_ON_FATAL_ERR);
+   break;
+   }
+   }
+   }
+
if (unlikely(SError & 0x)) {
DPRINTK("serror @host_intr : 0x%x\n", SError);
sata_fsl_error_intr(ap);
}
 
-   if (unlikely(hstatus & INT_ON_ERROR)) {
+   if (unlikely(hstatus & status_mask)) {
DPRINTK("error interrupt!!\n");
sata_fsl_error_intr(ap);
return;
}
 
-   /* Read command completed register */
-   done_mask = ioread32(hcr_base + CC);
-
VPRINTK("Status of all queues :\n");
VPRINTK("done_mask/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
done_mask,
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
new file mode 100644
index 000..0d7c4c2
--- /dev/null
+++ b/drivers/ata/sata_highbank.c
@@ -0,0 +1,450 @@
+/*
+ * Calxeda Highbank AHCI SATA platform driver
+ * Copyright 2012 Calxeda, Inc.
+ *
+ *

Re: [PATCH v3 -tip 5/5] AHCI: Support multiple MSIs

2012-10-02 Thread Jeff Garzik

On 10/02/2012 12:42 PM, Alexander Gordeev wrote:

On Tue, Oct 02, 2012 at 07:09:29AM +0200, Ingo Molnar wrote:

+irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance)
+{
+   struct ata_port *ap_this = dev_instance;
+   struct ahci_port_priv *pp = ap_this->private_data;
+   struct ata_host *host = ap_this->host;
+   struct ahci_host_priv *hpriv = host->private_data;
+   void __iomem *mmio = hpriv->mmio;
+   unsigned int i;
+   u32 irq_stat, irq_masked;
+
+   VPRINTK("ENTER\n");


Is this per IRQ handler execution debugging code still needed?
Same for the other VPRINTK() lines in this patch.


These VPRINKs are only to make new handlers look like ahci_interrupt()
which did not change. I believe, if they need to go it is better to
remove them altogether, with a separate followup patch.


Definitely followup patch material + discussion :)

For the moment, the above is consistent with existing code, and by 
default compiled out, as one would expect.


Jeff





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


  1   2   3   4   5   6   7   8   9   10   >