Re: ppc/sata-fsl: orphan config value: CONFIG_MPC8315_DS

2013-04-30 Thread Jeff Garzik

On 04/30/2013 02:41 AM, Anthony Foiani wrote:

Apologies for resurrecting a very old thread, but...

On 05/30/2012 02:14 PM, Anthony Foiani wrote:


Maybe someone who knows devtree really well could crank that out in a
few minutes... but I'm not that person.  :)

Well, I wasn't last year, but this year I decided that I didn't care.
Took me about an hour, not a minute, but...

Having been bitten by this config symbol disappearing one more time,
please find attached my attempt at using information out of the device
tree to enable this hack.

Patch is against 3.4.36 or so; hopefully upstream hasn't diverged very
much.

Tested by me, so feel free to add that tag if required.


Regarding this patch:  Search for sata_spd_limit and xxx_spd* functions

Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] fsl/sata: create a sysfs entry for rx water mark

2013-04-03 Thread Jeff Garzik

On 03/04/2013 02:20 AM, Qiang Liu wrote:

Support config RX WATER MARK via sysfs when running at run-time;
A wrokaround for fix the exception happened to some WD HDD, found on
WD3000HLFS-01G6U1, WD3000HLFS-01G6U0, some SSD disks. The read performance
is also regression (about 30%) when use default value.

According to the latest documents, 0x10 is the default value of RX WATER MARK,
but exception/performance issue happened to some disks mentioned above.

The exception log as below when testing read performance with IOZone:
ata1.00: exception Emask 0x0 SAct 0x7 SErr 0x80 action 0x6 frozen
ata1: SError: { LinkSeq }
ata1.00: failed command: READ FPDMA QUEUED
ata1.00: cmd 60/00:00:ff:2c:14/01:00:02:00:00/40 tag 0 ncq 131072 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1.00: failed command: READ FPDMA QUEUED
ata1.00: cmd 60/00:08:ff:2d:14/01:00:02:00:00/40 tag 1 ncq 131072 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/10:10:af:08:6e/00:00:12:00:00/40 tag 2 ncq 8192 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: hard resetting link
ata1: Hardreset failed, not off-lined 0
ata1: Signature Update detected @ 504 msecs
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata1.00: configured for UDMA/133
ata1.00: device reported invalid CHS sector 0
ata1.00: device reported invalid CHS sector 0
ata1.00: device reported invalid CHS sector 0
ata1: EH complete

The exception/performance can be resolved when RX WATER MARK value is 0x16.

Signed-off-by: Qiang Liu qiang@freescale.com
---
  drivers/ata/sata_fsl.c |   55 
  1 files changed, 55 insertions(+), 0 deletions(-)


applied, though it seems advisable to simply set 0x16 than all this mess



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/1] Add support 2 SATA ports for Maui and change filename from sata_dwc_460ex.c to sata_dwc_4xx.c

2012-04-13 Thread Jeff Garzik

On 04/13/2012 03:18 AM, Thang Nguyen wrote:

Thanks Jeff and Sergei,

As your suggestion, I will separate the patch into smaller patches and
support more features on the SATA DWC driver. The patches I intend to do
on the SATA DWC are as below:
  - Support hardreset: currently the hardreset is not supported. This
causes sometime the SATA driver does cause kernel crash because of
not-determined state.
  - Let device tree specified DMA channel: currently only channel 0 is
supported (number of channel is set to 1). If device tree not specified
DMA channel, channel 0 will be used as default.
  - Support ATAPI.
  - Remove dma_interrupt_count. for each DMA transfer, we need 2 interrupts
for QC completion: transfer completion and DMA transfer completion
interrupt. The current code wait for both 2 interrupts occur before
calling qc_complete. This will make out-of-sync state when an interrupt
lost or when errors occur. The change will process DMA register when DMA
transfer complete interrupt occur and call qc_issue when command
completion interrupt occur.
  - Fix NCQ issue and set .can_queue back to ATA_MAX_QUEUE.
  - Support Port Multiplier.
  - Support 2 SATA ports on Maui.


Sounds good, thanks for splitting up the patch into smaller pieces.  The 
main goal is that separate logical changes should go into separate patches.


Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/1] Add support 2 SATA ports for Maui and change filename from sata_dwc_460ex.c to sata_dwc_4xx.c

2012-04-12 Thread Jeff Garzik

On 04/03/2012 07:56 AM, Sergei Shtylyov wrote:

Hello.

On 03-04-2012 14:12, Thang Q. Nguyen wrote:


Signed-off-by: Thang Q. Nguyentqngu...@apm.com
---
Changes for v2:
- Use git rename feature to change the driver to the newname and for
easier review.



arch/powerpc/boot/dts/bluestone.dts | 21 +
drivers/ata/Makefile | 2 +-
drivers/ata/{sata_dwc_460ex.c = sata_dwc_4xx.c} | 1371
++
3 files changed, 904 insertions(+), 490 deletions(-)
rename drivers/ata/{sata_dwc_460ex.c = sata_dwc_4xx.c} (56%)


You submitted a magapatch doing several things at once (some even
needlessly) and even in two areas of the kernel. This needs proper
splitting/description.


Agreed...



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH V3] fsl-sata: add support for interrupt coalsecing feature

2012-03-02 Thread Jeff Garzik

On 02/28/2012 09:54 PM, Liu Qiang-B32616 wrote:

Hi Jeff,

Do you plan to apply it to upstream, or any suggestions? Thanks.


This patch has been in libata-dev (and thus linux-next) for about 2 weeks...



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH V2] fsl-sata: I/O load balancing

2012-02-10 Thread Jeff Garzik

On 01/19/2012 09:19 PM, qiang@freescale.com wrote:

From: Qiang Liuqiang@freescale.com

Reduce interrupt signals through reset Interrupt Coalescing Control Reg.
Provide dynamic method to adjust interrupt signals and timer ticks by sysfs.
It is a tradeoff for different applications.

Signed-off-by: Qiang Liuqiang@freescale.com
---

change for V2
support dynamic config interrupt coalescing register by /sysfs
test random small file with iometer
Description:
   1. fsl-sata interrupt will be raised 130 thousand times when write 8G file
 (dd if=/dev/zero of=/dev/sda2 bs=128K count=65536);
   2. most of interrupts raised because of only 1-4 commands completed;
   3. only 30 thousand times will be raised after set max interrupt threshold,
 more interrupts are coalesced as the description of ICC;

Test methods and results:
   1. test sequential large file performance,
   [root@p2020ds root]# echo 31 524287  \
/sys/devices/soc.0/ffe18000.sata/intr_coalescing
   [root@p2020ds root]# dd if=/dev/zero of=/dev/sda2 bs=128K count=65536
   [root@p2020ds root]# top

   CPU %  |  dd   |  flush-8:0 | softirq
   ---
   before | 20-22 |17-19   |7
   ---
   after  | 18-21 |15-16   |5
   ---
   2. test random small file with iometer,
  iometer paramters:
4 I/Os burst length, 1MB transfer request size, 100% write, 2MB file size
as default configuration of interrupt coalescing register, 1 interrupts and
  no timeout config, total write performance is 119MB per second,
after config with the maximum value, write performance is 110MB per second.

   After compare the test results, a configuable interrupt coalescing should be
   better when cope with flexible context.

  drivers/ata/sata_fsl.c |  111 ++--
  1 files changed, 107 insertions(+), 4 deletions(-)


Doesn't seem to apply to upstream, or another less recent -rc...

Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH][SDK v1.2] sata: I/O load balancing

2012-01-17 Thread Jeff Garzik

On 01/13/2012 04:57 AM, Liu Qiang-B32616 wrote:

No, I didn't test small file. I think this won't affect system load. I can have 
a test
and describe the result in next patch.


Please do...

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] libata/sas: only set FROZEN flag if new EH is supported

2011-06-21 Thread Jeff Garzik

On 06/21/2011 04:30 PM, Brian King wrote:

Looks good to me. Jeff/Tejun - any issues with merging this?


Looks good here too -- though of course we want to move towards purging 
old-EH paths :)


Queued...


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: known working sata_sil24.c setup on powerpc platforms?

2011-04-06 Thread Jeff Garzik

On 04/06/2011 01:48 PM, Moffett, Kyle D wrote:

On Apr 06, 2011, at 13:00, Leon Woestenberg wrote:

after investigating problems with sata_sil24.c on a freescale p2020
soc, I wonder if this driver works on powerpc at all?

Does anyone know of a working setup of sata_sil24 on a big endian
powerpc system?


Our P2020 boards work fine with legacy PCI interrupts (I think it's a sil3124 
over PCI-E); the only deficiency is that MSI does not seem to work.

I know our MSI *does* work in general because we have an Intel 82571EB chipset 
also attached via PCI-E with working MSI.


We've definitely had issues with sata_sil24 + MSI, also...

sata_sil24 does work on big endian in general.

Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH][v3] driver/FSL SATA:Fix wrong Device Error Register usage

2011-03-14 Thread Jeff Garzik

On 03/09/2011 02:17 AM, Prabhakar Kushwaha wrote:

When a single device error is detected, the device under the error is indicated
by the error bit set in the DER. There is a one to one mapping between register
bit and devices on Port multiplier(PMP) i.e. bit 0 represents PMP device 0 and
bit 1 represents PMP device 1 etc.

Current implementation treats Device error register value as device number not
set of bits representing multiple device on PMP. It is changed to consider bit
level.
No need to check for each set bit as all command is going to be aborted.

Signed-off-by: Ashish Kalrab00...@freescale.com
Signed-off-by: Prabhakar Kushwahaprabha...@freescale.com
---

  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (branch 
master)

  This patch is already gone through review of linuxppc-dev mail list.
  Making CC linuxppc-dev@lists.ozlabs.org

  Changes for v2: Incorporated Sergei Shtylyov's comment
- Put space after -
- added a line
  Changes for v3: Incorporated David Laight's comment
- Condition check for dereg 0 for hardware error

  drivers/ata/sata_fsl.c |7 +--
  1 files changed, 5 insertions(+), 2 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH #upstream-fixes] pata_mpc52xx: inherit from ata_bmdma_port_ops

2011-01-18 Thread Jeff Garzik

On 01/09/2011 05:48 PM, Tejun Heo wrote:

pata_mpc52xx supports BMDMA but inherits ata_sff_port_ops which
triggers BUG_ON() when a DMA command is issued.  Fix it.

Signed-off-by: Tejun Heot...@kernel.org
Reported-by: Roman Fietzeroman.fie...@telemotive.de
Cc: Sergei Shtylyovsshtyl...@mvista.com
Cc: sta...@kernel.org
---
  drivers/ata/pata_mpc52xx.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 8cc536e..d7d8026 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -610,7 +610,7 @@ static struct scsi_host_template mpc52xx_ata_sht = {
  };

  static struct ata_port_operations mpc52xx_ata_port_ops = {
-   .inherits   =ata_sff_port_ops,
+   .inherits   =ata_bmdma_port_ops,
.sff_dev_select = mpc52xx_ata_dev_select,
.set_piomode= mpc52xx_ata_set_piomode,


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] ATA: Add FSL sata v2 controller support

2011-01-18 Thread Jeff Garzik

On 01/17/2011 06:47 AM, Sergei Shtylyov wrote:

Hello.

On 17-01-2011 10:10, Xulei wrote:


In FSL sata v2 block, the snoop bit of PRDT Word3 description
information is at bit28 instead of bit22.



This patch adds FSL sata v2 probe and resolve this difference.



Signed-off-by: Xulei b33...@freescale.com


AFAIK, full name is required.


Signed-off-by: Roy Zang tie-fei.z...@freescale.com

[...]


diff --git a/arch/powerpc/boot/dts/p1022ds.dts
b/arch/powerpc/boot/dts/p1022ds.dts
index 2bbecbb..9ad41dd 100644
--- a/arch/powerpc/boot/dts/p1022ds.dts
+++ b/arch/powerpc/boot/dts/p1022ds.dts
@@ -475,14 +475,14 @@
};

sata@18000 {
- compatible = fsl,mpc8536-sata, fsl,pq-sata;
+ compatible = fsl,p1022-sata, fsl,pq-sata-v2;
reg =0x18000 0x1000;
cell-index =1;
interrupts =74 0x2;
};

sata@19000 {
- compatible = fsl,mpc8536-sata, fsl,pq-sata;
+ compatible = fsl,p1022-sata, fsl,pq-sata-v2;
reg =0x19000 0x1000;
cell-index =2;
interrupts =41 0x2;


Please put this into the separate patch and push thru the PPC tree.


I think it's OK to send 100% of this via the PPC tree.  The sata_fsl.c 
patch for data_snoop variability directly keys off a call to 
platform-specific detail (of_device_is_compatible call).


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

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH RESEND] pata_mpc52xx: driver needs BMDMA

2010-12-24 Thread Jeff Garzik

On 12/22/2010 10:50 AM, Wolfram Sang wrote:

Found by this build-error if BMDMA is disabled:

drivers/ata/pata_mpc52xx.c: In function 'mpc52xx_ata_init_one':
drivers/ata/pata_mpc52xx.c:662: error: 'ata_bmdma_interrupt' undeclared (first 
use in this function)
...

Move the Kconfig entry to the proper location as needed since
9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (libata-sff: make BMDMA optional)

Signed-off-by: Wolfram Sangw.s...@pengutronix.de
---

This is a build-failure, so fixing it before 2.6.37 would be great.

  drivers/ata/Kconfig  |   20 ++--
  drivers/ata/Makefile |2 +-
  2 files changed, 11 insertions(+), 11 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2]460EX on-chip SATA driverresubmisison

2010-07-14 Thread Jeff Garzik

On 07/06/2010 07:06 AM, Rupjyoti Sarmah wrote:

This patch enables the on-chip DWC SATA controller of the AppliedMicro 
processor 460EX.

Signed-off-by: Rupjyoti Sarmahrsar...@appliedmicro.com
Signed-off-by: Mark Miesfeldmmiesf...@appliedmicro.com
Signed-off-by: Prodyut Hazarikaphazar...@appliedmicro.com

---
This patch incorporates the changes advised in the mailing list. The device
tree changes were submitted as a seperate patch. Kconfig file is fixed in this 
version.

  drivers/ata/Kconfig  |9 +
  drivers/ata/Makefile |1 +
  drivers/ata/sata_dwc_460ex.c | 1756 ++
  3 files changed, 1766 insertions(+), 0 deletions(-)
  create mode 100644 drivers/ata/sata_dwc_460ex.c


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v1]460EX on-chip SATA driverresubmisison

2010-06-30 Thread Jeff Garzik

On 06/30/2010 02:47 PM, Wolfgang Denk wrote:

Dear Rupjyoti Sarmah,

In message3b928476b2fffdcf0694e5436e8a4...@mail.gmail.com  you wrote:


I took the mainline kernel v2.6.35-rc3 and downloaded using the git
download link.
I created the patch on 6/24/2010 after doing a git pull.


I don;t think that you used v2.6.35-rc3; using this version, I still
get this:

drivers/ata/sata_dwc_460ex.c:43:1: warning: DRV_NAME redefined
In file included from drivers/ata/sata_dwc_460ex.c:38:
drivers/ata/libata.h:31:1: warning: this is the location of the previous 
definition
drivers/ata/sata_dwc_460ex.c:44:1: warning: DRV_VERSION redefined
drivers/ata/libata.h:32:1: warning: this is the location of the previous 
definition
drivers/ata/sata_dwc_460ex.c: In function 'sata_dwc_scr_read':
drivers/ata/sata_dwc_460ex.c:777: error: 'struct ata_port' has no member named 
'ioaddr'
drivers/ata/sata_dwc_460ex.c: In function 'sata_dwc_scr_write':
drivers/ata/sata_dwc_460ex.c:793: error: 'struct ata_port' has no member named 
'ioaddr'
drivers/ata/sata_dwc_460ex.c: In function 'sata_dwc_error_intr':
drivers/ata/sata_dwc_460ex.c:844: error: 'struct ata_port_operations' has no 
member named 'sff_check_status'


It looks like -your- build config is missing CONFIG_ATA_SFF or similar.

If you actually look at include/linux/libata.h, you see that struct 
ata_port_operations most definitely has a member named sff_check_status, 
for example.  Ditto ata_port and member ioaddr, etc.


Jeff


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH]460EX on-chip SATA driver Kernel 2.6.33 resubmission

2010-05-14 Thread Jeff Garzik

On 05/05/2010 01:57 PM, Rupjyoti Sarmah wrote:

+static  void clear_interrupt_bit(struct sata_dwc_device *hsdev, u32 bit)
+{
+   out_le32(hsdev-sata_dwc_regs-intpr,
+in_le32(hsdev-sata_dwc_regs-intpr));
+}
+
+static  u32 qcmd_tag_to_mask(u8 tag)
+{
+   return 0x0001  (tag  0x1f);
+}
+
+/* See ahci.c */
+static void sata_dwc_error_intr(struct ata_port *ap,
+   struct sata_dwc_device *hsdev, uint intpr)
+{
+   struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
+   struct ata_eh_info *ehi =ap-link.eh_info;
+   unsigned int err_mask = 0, action = 0;
+   struct ata_queued_cmd *qc;
+   u32 serror;
+   u8 status, tag;
+   u32 err_reg;
+
+   ata_ehi_clear_desc(ehi);
+
+   serror = core_scr_read(SCR_ERROR);
+   status = ap-ops-sff_check_status(ap);
+
+   err_reg = in_le32((host_pvt.sata_dma_regs-interrupt_status.error.\
+   low));
+   tag = ap-link.active_tag;
+
+   dev_err(ap-dev, %s SCR_ERROR=0x%08x intpr=0x%08x status=0x%08x 
+   dma_intp=%d pending=%d issued=%d dma_err_status=0x%08x\n,
+   __func__, serror, intpr, status, host_pvt.dma_interrupt_count,
+   hsdevp-dma_pending[tag], hsdevp-cmd_issued[tag], err_reg);
+
+   /* Clear error register and interrupt bit */
+   clear_serror();
+   clear_interrupt_bit(hsdev, SATA_DWC_INTPR_ERR);
+
+   /* This is the only error happening now.  TODO check for exact error */
+   err_mask |= AC_ERR_HOST_BUS;
+   action |= ATA_EH_RESET;


this is a rather poor error mapping.



+/**
+ * Function : sata_dwc_isr
+ * arguments : irq, void *dev_instance, struct pt_regs *regs
+ * Return value : irqreturn_t - status of IRQ
+ * This Interrupt handler called via port ops registered function.
+ * .irq_handler = sata_dwc_isr
+ */
+static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
+{
+   struct ata_host *host = (struct ata_host *)dev_instance;
+   struct sata_dwc_device *hsdev = HSDEV_FROM_HOST(host);
+   struct ata_port *ap;
+   struct ata_queued_cmd *qc;
+   unsigned long flags;
+   u8 status, tag;
+   int handled, num_processed, port = 0;
+   uint intpr, sactive, sactive2, tag_mask;
+   struct sata_dwc_device_port *hsdevp;
+   host_pvt.sata_dwc_sactive_issued = 0;
+
+   spin_lock_irqsave(host-lock, flags);
+
+   /* Read the interrupt register */
+   intpr = in_le32(hsdev-sata_dwc_regs-intpr);
+
+   ap = host-ports[port];
+   hsdevp = HSDEVP_FROM_AP(ap);
+
+   dev_dbg(ap-dev, %s intpr=0x%08x active_tag=%d\n, __func__, intpr,
+   ap-link.active_tag);
+
+   /* Check for error interrupt */
+   if (intpr  SATA_DWC_INTPR_ERR) {
+   sata_dwc_error_intr(ap, hsdev, intpr);
+   handled = 1;
+   goto DONE;
+   }
+
+   /* Check for DMA SETUP FIS (FP DMA) interrupt */
+   if (intpr  SATA_DWC_INTPR_NEWFP) {
+   clear_interrupt_bit(hsdev, SATA_DWC_INTPR_NEWFP);
+
+   tag = (u8)(in_le32(hsdev-sata_dwc_regs-fptagr));
+   dev_dbg(ap-dev, %s: NEWFP tag=%d\n, __func__, tag);
+   if (hsdevp-cmd_issued[tag] != SATA_DWC_CMD_ISSUED_PEND)
+   dev_warn(ap-dev, CMD tag=%d not pending?\n, tag);
+
+   host_pvt.sata_dwc_sactive_issued |= qcmd_tag_to_mask(tag);
+
+   qc = ata_qc_from_tag(ap, tag);
+   /* Start FP DMA for NCQ command.  At this point the tag is the
+* active tag.  It is the tag that matches the command about to
+* be completed.
+*/
+   qc-ap-link.active_tag = tag;
+   sata_dwc_bmdma_start_by_tag(qc, tag);
+
+   handled = 1;
+   goto DONE;
+   }
+
+   sactive = core_scr_read(SCR_ACTIVE);
+   tag_mask = (host_pvt.sata_dwc_sactive_issued | sactive) ^ sactive;
+
+   /* If no sactive issued and tag_mask is zero then this is not NCQ */
+   if (host_pvt.sata_dwc_sactive_issued == 0  tag_mask == 0) {
+   if (ap-link.active_tag == ATA_TAG_POISON)
+   tag = 0;
+   else
+   tag = ap-link.active_tag;
+   qc = ata_qc_from_tag(ap, tag);
+
+   /* DEV interrupt w/ no active qc? */
+   if (unlikely(!qc || (qc-tf.flags  ATA_TFLAG_POLLING))) {
+   dev_err(ap-dev, %s interrupt with no active qc 
+   qc=%p\n, __func__, qc);
+   ap-ops-sff_check_status(ap);
+   handled = 1;
+   goto DONE;
+   }
+
+   status = ap-ops-sff_check_status(ap);
+
+   qc-ap-link.active_tag = tag;
+ 

Re: [PATCH] 460EX on-chip SATA driverkernel 2.6.33 resubmission : 02

2010-04-06 Thread Jeff Garzik

On 04/06/2010 07:41 AM, Rupjyoti Sarmah wrote:

General comment:  remove inline and let the compiler select those 
functions that need it.




+struct sata_dwc_host_priv {
+
+   void __iomem *scr_addr_sstatus;
+   u32 sata_dwc_sactive_issued;
+   u32 sata_dwc_sactive_queued;
+   u32 dma_interrupt_count;
+   struct ahb_dma_regs *sata_dma_regs;
+   struct device *dwc_dev;
+
+};


use proper indentation (separate type from member name with tabs)



+struct sata_dwc_host_priv host_pvt;
+
+/*
+ * Prototypes
+ */
+static void sata_dwc_bmdma_start_by_tag(struct ata_queued_cmd *qc, u8 tag);
+static int sata_dwc_qc_complete(struct ata_port *ap, struct ata_queued_cmd *qc,
+   u32 check_status);
+static void sata_dwc_dma_xfer_complete(struct ata_port *ap, u32 check_status);
+static void sata_dwc_port_stop(struct ata_port *ap);
+static void sata_dwc_clear_dmacr(struct sata_dwc_device_port *hsdevp, u8 tag);
+
+static int dma_dwc_init(struct sata_dwc_device *hsdev, int irq);
+static void dma_dwc_exit(struct sata_dwc_device *hsdev);
+static int dma_dwc_xfer_setup(struct scatterlist *sg, int num_elems,
+ struct lli *lli, dma_addr_t dma_lli,
+ void __iomem *addr, int dir);
+static void dma_dwc_xfer_start(int dma_ch);
+
+static const char *dir_2_txt(enum dma_data_direction dir)
+{
+   switch (dir) {
+   case DMA_BIDIRECTIONAL:
+   return bi;
+   case DMA_FROM_DEVICE:
+   return from;
+   case DMA_TO_DEVICE:
+   return to;
+   case DMA_NONE:
+   return none;
+   default:
+   return err;
+   }
+}
+
+static const char *prot_2_txt(enum ata_tf_protocols protocol)
+{
+   switch (protocol) {
+   case ATA_PROT_UNKNOWN:
+   return unknown;
+   case ATA_PROT_NODATA:
+   return nodata;
+   case ATA_PROT_PIO:
+   return pio;
+   case ATA_PROT_DMA:
+   return dma;
+   case ATA_PROT_NCQ:
+   return ncq;
+   case ATAPI_PROT_PIO:
+   return atapi pio;
+   case ATAPI_PROT_NODATA:
+   return atapi nodata;
+   case ATAPI_PROT_DMA:
+   return atapi dma;
+   default:
+   return err;
+   }
+}
+
+inline const char *ata_cmd_2_txt(const struct ata_taskfile *tf)
+{
+   switch (tf-command) {
+   case ATA_CMD_CHK_POWER:
+   return ATA_CMD_CHK_POWER;
+   case ATA_CMD_EDD:
+   return ATA_CMD_EDD;
+   case ATA_CMD_FLUSH:
+   return ATA_CMD_FLUSH;
+   case ATA_CMD_FLUSH_EXT:
+   return ATA_CMD_FLUSH_EXT;
+   case ATA_CMD_ID_ATA:
+   return ATA_CMD_ID_ATA;
+   case ATA_CMD_ID_ATAPI:
+   return ATA_CMD_ID_ATAPI;
+   case ATA_CMD_FPDMA_READ:
+   return ATA_CMD_FPDMA_READ;
+   case ATA_CMD_FPDMA_WRITE:
+   return ATA_CMD_FPDMA_WRITE;
+   case ATA_CMD_READ:
+   return ATA_CMD_READ;
+   case ATA_CMD_READ_EXT:
+   return ATA_CMD_READ_EXT;
+   case ATA_CMD_READ_NATIVE_MAX_EXT:
+   return ATA_CMD_READ_NATIVE_MAX_EXT;
+   case ATA_CMD_VERIFY_EXT:
+   return ATA_CMD_VERIFY_EXT;
+   case ATA_CMD_WRITE:
+   return ATA_CMD_WRITE;
+   case ATA_CMD_WRITE_EXT:
+   return ATA_CMD_WRITE_EXT;
+   case ATA_CMD_PIO_READ:
+   return ATA_CMD_PIO_READ;
+   case ATA_CMD_PIO_READ_EXT:
+   return ATA_CMD_PIO_READ_EXT;
+   case ATA_CMD_PIO_WRITE:
+   return ATA_CMD_PIO_WRITE;
+   case ATA_CMD_PIO_WRITE_EXT:
+   return ATA_CMD_PIO_WRITE_EXT;
+   case ATA_CMD_SET_FEATURES:
+   return ATA_CMD_SET_FEATURES;
+   case ATA_CMD_PACKET:
+   return ATA_CMD_PACKET;
+   default:
+   return ATA_CMD_???;
+   }


use ata_get_cmd_descript() rather than duplicating it


+static irqreturn_t dma_dwc_interrupt(int irq, void *hsdev_instance)
+{
+   int chan;
+   u32 tfr_reg, err_reg;
+
+   struct sata_dwc_device *hsdev =
+   (struct sata_dwc_device *) hsdev_instance;
+   struct ata_host *host = (struct ata_host *) hsdev-host;
+   struct ata_port *ap;
+   struct sata_dwc_device_port *hsdevp;
+   u8 tag = 0;
+   unsigned int port = 0;
+   struct sata_dwc_host_priv *hp;
+   hp = kmalloc(sizeof(*hp), GFP_KERNEL);


1) interrupt is not GFP_KERNEL

2) you must failure kmalloc failure

3) it is not clear to me where you initialize this structure???



+   spin_lock(host-lock);
+
+   ap = host-ports[port];
+   hsdevp = HSDEVP_FROM_AP(ap);
+   tag = ap-link.active_tag;
+
+   tfr_reg = in_le32((host_pvt.sata_dma_regs-interrupt_status.tfr.low));
+   err_reg = in_le32((host_pvt.sata_dma_regs-  \
+   

Re: [PATCH] 460EX on-chip SATA driverkernel 2.6.33 resubmission : 01

2010-03-17 Thread Jeff Garzik

On 03/17/2010 08:03 AM, Stefan Roese wrote:

Hi Rup,

On Wednesday 17 March 2010 05:23:16 Rupjyoti Sarmah wrote:

This patch enables the on-chip DWC SATA controller of the AppliedMicro
processor 460EX.


Apart from the other comments, did you take a look at the latest version of
this driver in our linux-2.6-denx repository? We did some work on this driver
for a new Canyonlands release last year. It's hard to check this for me now,
with this line wrapped patch (the drivers diverged somewhat). So either check
for yourself, or send a new, not line-wrapped, patch version so that I can
better check myself.

BTW: It would be nice if you would add me to Cc on DWC-SATA related patches,
since I've been involved in the development at some time.


I will wait for Rupjyoti to check the linux-2.6-denx repo, and resend 
the patches without word wrapping.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Jeff Garzik

On 03/11/2010 01:31 PM, Sergei Shtylyov wrote:

Hello.

Grant Likely wrote:


.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

drivers/ata/pata_macio.c | 2 +-
drivers/ata/pata_of_platform.c | 2 +-
drivers/ide/pmac.c | 10 +-
3 files changed, 7 insertions(+), 7 deletions(-)


Should probably have been 2 patches instead of one, as drivers/ata/ and
drivers/ide/ are different subsystems...


Possibly, but these patches should go in via the OF tree anyway, so 
collecting ACKs should be sufficient.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] pata_mpc52xx: optimizing code size by change of ATA timing data types

2010-03-01 Thread Jeff Garzik

On 02/16/2010 02:41 PM, Grant Likely wrote:

[cc'd linux-kernel, linux-ide and Jeff Garzik]

Hi Roman.

you should use ./scripts/get_maintainer.pl to make sure you're cc'ing
the right people when posting patches.  You should repost so that Jeff
has a copy of the patch to pick up (and add my acked-by when you do).

On Wed, Dec 16, 2009 at 6:29 AM, Roman Fietze
roman.fie...@telemotive.de  wrote:

Hello Everybody,

A totally simple patch that reduces the text size as of the
ppc_6xx-size command of pata_mpc52xx by more than 10%, by reducing the
rodata size from 0x4a4 to 0x17e bytes. This is simply done by changing
the data types of the ATA timing constants.


Acked-by: Grant Likelygrant.lik...@secretlab


I have the ACK, but never saw the requested repost...  req that, please?

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 5/5] libata/drivers: Add pata_macio, driver Apple PowerMac/PowerBook IDE controller

2009-12-03 Thread Jeff Garzik

On 12/01/2009 07:36 PM, Benjamin Herrenschmidt wrote:

This is a libata driver for the macio IDE controller used on most Apple
PowerMac and PowerBooks. It's a libata equivalent of drivers/ide/ppc/pmac.c

It supports all the features of its predecessor, including mediabay hotplug
and suspend/resume. It should also support module load/unload.

The timing calculations have been simplified to use pre-calculated tables
compared to drivers/ide/pmac.c and it uses the new mediabay interface
provided by a previous patch.

Signed-off-by: Benjamin Herrenschmidtb...@kernel.crashing.org
---

v2. Better tested now, seems to be reasonably solid.

Addressed Tejun comments and made remove more robust vs. media-bay,
should also fix Andreas problem.


  drivers/ata/Kconfig  |   10
  drivers/ata/Makefile |1
  drivers/ata/pata_macio.c | 1427 
+++
  3 files changed, 1438 insertions(+)


Looks fine to me.  Two minor comments, which might perhaps be ignored if 
that is your taste:


* prefer enums to #define's, for constants

* prefer direct function call to ap-ops-foo_bar(), because 
ap-ops-foo_bar() is guaranteed to be a constant value known to the 
driver.  The driver is the entity responsible for the function pointer.


Maybe saves a cycle or two.  Not terribly important, but hey, calling 
ap-ops-sff_exec_command() from pata_macio_bmdma_setup() is a hot path.


Jeff





___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 4/5] libata/sff: Use ops-bmdma_stop instead of ata_bmdma_stop()

2009-12-02 Thread Jeff Garzik

On 12/01/2009 07:36 PM, Benjamin Herrenschmidt wrote:

In libata-sff, ata_sff_post_internal_cmd() directly calls ata_bmdma_stop()
instead of ap-ops-bmdma_stop(). This can be a problem for controllers
that use their own bmdma_stop for which the generic sff one isn't suitable

Signed-off-by: Benjamin Herrenschmidtb...@kernel.crashing.org
---

  drivers/ata/libata-sff.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-work.orig/drivers/ata/libata-sff.c2009-12-01 17:48:27.0 
+1100
+++ linux-work/drivers/ata/libata-sff.c 2009-12-01 17:48:48.0 +1100
@@ -2384,7 +2384,7 @@ void ata_sff_post_internal_cmd(struct at
ap-hsm_task_state = HSM_ST_IDLE;

if (ap-ioaddr.bmdma_addr)
-   ata_bmdma_stop(qc);
+   ap-ops-bmdma_stop(qc);

spin_unlock_irqrestore(ap-lock, flags);


applied

As we discussed, feel free to carry this in your tree as well.  git 
should be able to sort it out.


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


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] sata_fsl: Split hard and soft reset

2009-11-19 Thread Jeff Garzik

On 10/16/2009 12:44 PM, Anton Vorontsov wrote:

From: Jiang Yutangb14...@freescale.com

Split sata_fsl_softreset() into hard and soft resets to make
error-handling more efficient  device and PMP detection more
reliable.

Also includes fix for PMP support, driver tested with Sil3726,
Sil4726  Exar PMP controllers.

[AV: Also fixes resuming from deep sleep on MPC8315 CPUs]

Signed-off-by: Jiang Yutangb14...@freescale.com
Signed-off-by: Anton Vorontsovavoront...@ru.mvista.com
---
  drivers/ata/sata_fsl.c |   84 +---
  1 files changed, 44 insertions(+), 40 deletions(-)


applied #upstream-fixes


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH][v3] Add asynchronous notification support

2009-11-19 Thread Jeff Garzik

On 07/01/2009 11:29 AM, ashish kalra wrote:

Enable device hot-plug support on Port multiplier fan-out ports
v3 fixes whitespace/identation issues

Signed-off-by: Ashish Kalra ashish.ka...@freescale.com
---
drivers/ata/sata_fsl.c | 15 ++-
1 files changed, 10 insertions(+), 5 deletions(-)


applied #upstream


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] sata_fsl: Split hard and soft reset

2009-11-16 Thread Jeff Garzik

On 11/05/2009 10:02 AM, Kumar Gala wrote:


On Oct 16, 2009, at 11:44 AM, Anton Vorontsov wrote:


From: Jiang Yutang b14...@freescale.com

Split sata_fsl_softreset() into hard and soft resets to make
error-handling more efficient  device and PMP detection more
reliable.

Also includes fix for PMP support, driver tested with Sil3726,
Sil4726  Exar PMP controllers.

[AV: Also fixes resuming from deep sleep on MPC8315 CPUs]

Signed-off-by: Jiang Yutang b14...@freescale.com
Signed-off-by: Anton Vorontsov avoront...@ru.mvista.com
---
drivers/ata/sata_fsl.c | 84
+---
1 files changed, 44 insertions(+), 40 deletions(-)


Jeff,

any update on this going in for .32?


It seems I missed this, and an SNotification patch for sata_fsl as well 
(Bart noticed the latter)...


Will push, probably tomorrow...

Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/1] ata/sata_sil24: MSI support, disabled by default

2009-11-16 Thread Jeff Garzik

On 11/16/2009 01:19 AM, Vivek Mahajan wrote:

The following patch adds MSI support. Some platforms
may have broken MSI, so those are defaulted to use
legacy PCI interrupts.

Signed-off-by: Vivek Mahajanvivek.maha...@freescale.com
---
  drivers/ata/sata_sil24.c |9 +
  1 files changed, 9 insertions(+), 0 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/1] ata/sata_sil24: MSI support, disabled by default

2009-11-16 Thread Jeff Garzik

On 11/17/2009 01:59 AM, Mahajan Vivek-B08308 wrote:

From: Grant Grundler [mailto:grund...@google.com]
Sent: Monday, November 16, 2009 11:08 PM

+static int sata_sil24_msi;/* Disable MSI */
+module_param_named(msi, sata_sil24_msi, bool, S_IRUGO);
+MODULE_PARM_DESC(msi, Enable MSI (Default: false));


Vivek,
Do we even still need the parameter? I'm thinking either MSI
works with a chipset or it doesn't. The kernel has globals to
know which state is true.


Sometimes even in a platform, some PCIe endpoints do very
well with MSI while others may have to resort to legacy ints.
Should we let the endpoints make the final call.



If the parameter is needed, when this driver is compiled into
the kernel, how is msi parameter specified?
I think the parameter needs to be documented and fit in with
other msi parameters.
See nomsi in Documentation/kernel-parameters.txt.


In this case msi is supposed to be passed via insmod and
not via kernel cmdline. If the driver is built-in the kernel,
then force sata_sil24_msi = 1 in the driver to enable it.


First, the original patch was just fine, and it was applied.  You should 
have received email confirmation of this already.


Second, all module options are available on the kernel command line, 
when a module is built into the kernel.  You supply a module name prefix 
to each module option, on the kernel command line.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [RESEND][PATCH] sata_fsl: hard and soft reset split

2009-09-11 Thread Jeff Garzik

On 06/29/2009 09:26 AM, ashish kalra wrote:

Split sata_fsl_softreset() into hard and soft resets to make
error-handling more efficient  device and PMP detection more reliable.

Also includes fix for PMP support, driver tested with Sil3726, Sil4726 
Exar PMP controllers.

Signed-off-by: Ashish Kalra ashish.ka...@freescale.com


can you rediff this and 'AN' support against latest upstream?

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH][sata_fsl] Defer non-ncq commands when ncq commands active

2009-09-08 Thread Jeff Garzik

On 07/29/2009 12:03 PM, ashish kalra wrote:

From: Ashish Kalra ashish.ka...@freescale.com
Date: Wed, 29 Jul 2009 21:15:49 +0530

Fix for non-ncq  ncq commands causing timeouts when both are issued
simultaneously to the same device.

Signed-off-by: Ashish Kalra ashish.ka...@freescale.com
---
drivers/ata/sata_fsl.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 5a88b44..a33f130 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1262,6 +1262,7 @@ static struct scsi_host_template sata_fsl_sht = {
static struct ata_port_operations sata_fsl_ops = {
.inherits = sata_pmp_port_ops,

+ .qc_defer = ata_std_qc_defer;


Applied version with obvious s/;/,/ fix...

Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] sata_fsl: Add power mgmt support

2009-06-23 Thread Jeff Garzik

Kumar Gala wrote:

From: Dave Liu dave...@freescale.com

Signed-off-by: Dave Liu dave...@freescale.com
Signed-off-by: Liu Yu yu@freescale.com
Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
 drivers/ata/sata_fsl.c |   35 +++
 1 files changed, 35 insertions(+), 0 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v3] sata_fsl: Fix compile warnings

2009-05-15 Thread Jeff Garzik

Kumar Gala wrote:

We we build with dma_addr_t as a 64-bit quantity we get:

drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':
drivers/ata/sata_fsl.c:340: warning: format '%x' expects type 'unsigned int', 
but argument 4 has type 'dma_addr_t'

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
* v2: fixed extra 'x'
* v3: fixed whitespace issue

 drivers/ata/sata_fsl.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/3 v3] Added support for Designware SATA controller driver

2009-05-11 Thread Jeff Garzik

Feng Kan wrote:

Signed-off-by: Feng Kan f...@amcc.com
Signed-off-by: Mark Miesfeld miesf...@gmail.com
---
 drivers/ata/Kconfig|   10 +
 drivers/ata/Makefile   |1 +
 drivers/ata/sata_dwc.c | 2053 
 3 files changed, 2064 insertions(+), 0 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 0bcf264..c3d0b24 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -72,6 +72,16 @@ config SATA_FSL
 
 	  If unsure, say N.
 
+config SATA_DWC

+   tristate DesignWare Cores SATA support
+   depends on 460EX
+   help
+ This option enables support for the Synopsys DesignWare Cores SATA
+ controller.
+ It can be found on the AMCC 460EX.
+
+ If unsure, say N.
+
 config ATA_SFF
bool ATA SFF support
default y
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 7f1ecf9..3d41fc7 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -18,6 +18,7 @@ obj-$(CONFIG_SATA_MV) += sata_mv.o
 obj-$(CONFIG_SATA_INIC162X)+= sata_inic162x.o
 obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
 obj-$(CONFIG_SATA_FSL) += sata_fsl.o
+obj-$(CONFIG_SATA_DWC)  += sata_dwc.o
 
 obj-$(CONFIG_PATA_ALI)		+= pata_ali.o

 obj-$(CONFIG_PATA_AMD) += pata_amd.o
diff --git a/drivers/ata/sata_dwc.c b/drivers/ata/sata_dwc.c
new file mode 100644
index 000..672f91f
--- /dev/null
+++ b/drivers/ata/sata_dwc.c
@@ -0,0 +1,2053 @@
+/*
+ * drivers/ata/sata_dwc.c
+ *
+ * Synopsys DesignWare Cores (DWC) SATA host driver
+ *
+ * Author: Mark Miesfeld mmiesf...@amcc.com
+ *
+ * Ported from 2.6.19.2 to 2.6.25/26 by Stefan Roese s...@denx.de
+ * Copyright 2008 DENX Software Engineering
+ *
+ * Based on versions provided by AMCC and Synopsys which are:
+ *  Copyright 2006 Applied Micro Circuits Corporation
+ *  COPYRIGHT (C) 2005  SYNOPSYS, INC.  ALL RIGHTS RESERVED
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+#ifdef CONFIG_SATA_DWC_DEBUG
+#define DEBUG
+#endif
+
+#ifdef CONFIG_SATA_DWC_VDEBUG
+#define VERBOSE_DEBUG
+#define DEBUG_NCQ
+#endif
+
+#include linux/kernel.h
+#include linux/module.h
+#include linux/init.h
+#include linux/device.h
+#include linux/platform_device.h
+#include linux/libata.h
+
+#include scsi/scsi_host.h
+#include scsi/scsi_cmnd.h
+
+#define DRV_NAMEsata-dwc
+#define DRV_VERSION 1.0
+
+/* SATA DMA driver Globals */
+#define DMA_NUM_CHANS  1
+#define DMA_NUM_CHAN_REGS  8
+
+/* SATA DMA Register definitions */
+#define AHB_DMA_BRST_DFLT  64  /* 16 data items burst length */
+
+struct dmareg {
+   u32 low;/* Low bits 0-31 */
+   u32 high;   /* High bits 32-63 */
+};
+
+/* DMA Per Channel registers */
+
+struct dma_chan_regs {
+   struct dmareg sar;  /* Source Address */
+   struct dmareg dar;  /* Destination address */
+   struct dmareg llp;  /* Linked List Pointer */
+   struct dmareg ctl;  /* Control */
+   struct dmareg sstat;/* Source Status not implemented in core */
+   struct dmareg dstat;/* Destination Status not implemented in core */
+   struct dmareg sstatar;  /* Source Status Address not impl in core */
+   struct dmareg dstatar;  /* Destination Status Address not implemented */
+   struct dmareg cfg;  /* Config */
+   struct dmareg sgr;  /* Source Gather */
+   struct dmareg dsr;  /* Destination Scatter */
+};
+
+/* Generic Interrupt Registers */
+struct dma_interrupt_regs {
+   struct dmareg tfr;  /* Transfer Interrupt */
+   struct dmareg block;/* Block Interrupt */
+   struct dmareg srctran;  /* Source Transfer Interrupt */
+   struct dmareg dsttran;  /* Dest Transfer Interrupt */
+   struct dmareg error;/* Error */
+};
+
+struct ahb_dma_regs {
+   struct dma_chan_regschan_regs[DMA_NUM_CHAN_REGS];
+   struct dma_interrupt_regs interrupt_raw;/* Raw Interrupt */
+   struct dma_interrupt_regs interrupt_status; /* Interrupt Status */
+   struct dma_interrupt_regs interrupt_mask;   /* Interrupt Mask */
+   struct dma_interrupt_regs interrupt_clear;  /* Interrupt Clear */
+   struct dmareg   statusInt;  /* Interrupt combined */
+   struct dmareg   rq_srcreg;  /* Src Trans Req */
+   struct dmareg   rq_dstreg;  /* Dst Trans Req */
+   struct dmareg   rq_sgl_srcreg;  /* Sngl Src Trans Req */
+   struct dmareg   rq_sgl_dstreg;  /* Sngl Dst Trans Req */
+   struct dmareg   rq_lst_srcreg;  /* 

Re: [PATCH 1/2] Add support for Designware SATA controller driver

2009-05-01 Thread Jeff Garzik

Feng Kan wrote:

Signed-off-by: Feng Kan f...@amcc.com
---
 drivers/ata/Kconfig|   76 +-
 drivers/ata/Makefile   |1 +
 drivers/ata/sata_dwc.c | 2047 
 3 files changed, 2091 insertions(+), 33 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c


I don't see a patch 2/2 ?


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] Add support for Designware SATA controller driver

2009-05-01 Thread Jeff Garzik

Benjamin Herrenschmidt wrote:

Patch 2/2 is just adding the device-tree bits to the platform for
this driver to match against, so it's no big deal. However, Feng,
we already mentioned that you do a lot of unrelated changes to the
Kconfig file that shouldn't be part of this patch, just add the
entry for this chip, don't move stuff around in Kconfig, unless I
missed a good reason why this is done that way.



Quite correct -- those drivers/ata/Kconfig changes are bogus.

Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] Added support for Designware SATA controller driver

2009-05-01 Thread Jeff Garzik

Wolfgang Denk wrote:

Dear Feng Kan,

In message 1241211767-32697-1-git-send-email-f...@amcc.com you wrote:

This adds support for the Designware SATA controller.

Signed-off-by: Feng Kan f...@amcc.com
Signed-off-by: Mark Miesfeld miesf...@gmail.com
---
 drivers/ata/Kconfig|   10 +
 drivers/ata/Makefile   |1 +
 drivers/ata/sata_dwc.c | 2053 
 3 files changed, 2064 insertions(+), 0 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c


...

+
+MODULE_LICENSE(GPL);
+MODULE_AUTHOR(Mark Miesfeld mmiesf...@amcc.com);
+MODULE_DESCRIPTION(DesignWare Cores SATA controller low lever driver);

^

Guess that's a typo?


heh



Hmm... that's 2000+ lines of code in a single file. Maybe this should
be split?


A single file is just fine.

Jeff


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: ahci: drop intx manipulation on msi enable breaks ULI M1575

2009-04-08 Thread Jeff Garzik

Michael Ellerman wrote:

On Tue, 2009-04-07 at 19:36 -0500, Timur Tabi wrote:

On Tue, Apr 7, 2009 at 6:57 PM, Tejun Heo t...@kernel.org wrote:


Hmmm... that means intx isn't set by default.  I'm not sure what is
the right thing to do here.  I think it's something which should be
handled by the PCI layer.  Oh well, maybe we should just revert the
change and keep setting intx?

cc'ing linuxppc-dev

I really don't know what should be done.  It seems to make sense to
have the PCI layer enable interrupts.

This seems to be a powerpc-specific bug, but I don't know enough of
the PCI subsystem.


Have you confirmed that INTX is disabled before that call?


The symptoms definitely indicate such, as well as his reversing that commit.

My guess is that this is a ULI M1575-specific bug, and the PCI layer 
needs a quirk that knows this device does -not- disable INTX, when MSI 
is enabled.


But honestly, I never saw any harm in disabling INTX manually.  Indeed, 
I wrote the code that disabled INTX out of now-substantiated paranoia 
that some PCI devices would be too dumb to follow that particular MSI 
rule...  and the cost of twiddling INTX seemed quite low in comparison 
the potential problems created by the absence of INTX twiddling.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: ahci: drop intx manipulation on msi enable breaks ULI M1575

2009-04-08 Thread Jeff Garzik

Michael Ellerman wrote:

On Wed, 2009-04-08 at 23:23 -0500, Kumar Gala wrote:

On Apr 8, 2009, at 6:53 PM, Michael Ellerman wrote:


On Wed, 2009-04-08 at 17:15 -0500, Timur Tabi wrote:

On Wed, Apr 8, 2009 at 4:31 PM, Tejun Heo t...@kernel.org wrote:

Hmmm... for now,
I think it would be best to revert the original change.  Jeff, can  
you

please do that?

Actually, give me a few days before you do that.  A colleague gave me
some suggestions to debug this.

What device did you say it was? A ULI M1575 ?

Is that this one?

DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575,  
hpcd_quirk_uli1575);


static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev)
{
   u32 temp32;

   if (!machine_is(mpc86xx_hpcd))
   return;

   /* Disable INTx */
   pci_read_config_dword(dev, 0x48, temp32);
   pci_write_config_dword(dev, 0x48, (temp32 | 126));
..
It is the odd thing is the board he's running on is a mpc86xx_hpcd so  
he shouldn't be hitting the code that actually disables INTx.


Sorry Kumar that's not parsing :)

He is running an mpc86xx_hpcd, so he _should_ be hitting the code that
disables INTX?


The reversed logic of the PCI bit itself also makes for confusing 
discusion.  In an attempt to be helpful, here is a restatement of what 
is happening:


1) Old 'ahci' used to clear PCI_COMMAND_INTX_DISABLE, thus ensuring INTX 
interrupts are enabled... if and only if MSI is unavailable.


2) Current 'ahci' no longer does this

3) As a result, Timur's 'ahci' is no longer receiving interrupts. 
Presumably this means that BOTH of the following conditions are true


a) INTX is disabled
b) MSI is not available

Today I am thinking we should either revert the libata commit 
(a5bfc4714b3f01365aef89a92673f2ceb1ccf246), or poke PCI to twiddle INTX 
for us at pci_enable_device() time, perhaps.


I lean towards the former, but maybe the platform folks prefer a third 
solution?


Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver

2008-11-14 Thread Jeff Garzik

ACK


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ehea: Fix some whitespace issues

2008-11-05 Thread Jeff Garzik

Hannes Hering wrote:

This patch removes some trailing whitespaces and spaces before tabs.

Signed-off-by: Hannes Hering [EMAIL PROTECTED]
---
diff -Nurp -X dontdiff linux-2.6.28-rc3/drivers/net/ehea/ehea.h 
patched_kernel/drivers/net/ehea/ehea.h
--- linux-2.6.28-rc3/drivers/net/ehea/ehea.h2008-11-02 23:17:19.0 
+0100
+++ patched_kernel/drivers/net/ehea/ehea.h  2008-11-05 10:10:14.563107976 
+0100
@@ -40,7 +40,7 @@
 #include asm/io.h
 
 #define DRV_NAME	ehea

-#define DRV_VERSIONEHEA_0095
+#define DRV_VERSIONEHEA_0096
 
 /* eHEA capability flags */

 #define DLPAR_PORT_ADD_REM 1
diff -Nurp -X dontdiff linux-2.6.28-rc3/drivers/net/ehea/ehea_qmr.c 
patched_kernel/drivers/net/ehea/ehea_qmr.c
--- linux-2.6.28-rc3/drivers/net/ehea/ehea_qmr.c2008-11-02 
23:17:19.0 +0100
+++ patched_kernel/drivers/net/ehea/ehea_qmr.c  2008-11-05 10:10:14.563107976 
+0100
@@ -653,7 +653,7 @@ static int ehea_update_busmap(unsigned l
int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
int dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
int idx = i  EHEA_INDEX_MASK;
-   
+
if (add) {
int ret = ehea_init_bmap(ehea_bmap, top, dir);
if (ret)
@@ -780,7 +780,7 @@ void ehea_destroy_busmap(void)
 
 	kfree(ehea_bmap);

ehea_bmap = NULL;
-out_destroy:   
+out_destroy:
mutex_unlock(ehea_busmap_mutex);
 }
 
@@ -858,10 +858,10 @@ static u64 ehea_reg_mr_sections(int top,

for (idx = 0; idx  EHEA_MAP_ENTRIES; idx++) {
if (!ehea_bmap-top[top]-dir[dir]-ent[idx])
continue;
-   
+
hret = ehea_reg_mr_section(top, dir, idx, pt, adapter, mr);
if ((hret != H_SUCCESS)  (hret != H_PAGE_REGISTERED))
-   return hret;
+   return hret;
}
return hret;
 }
@@ -879,7 +879,7 @@ static u64 ehea_reg_mr_dir_sections(int 
 
 		hret = ehea_reg_mr_sections(top, dir, pt, adapter, mr);

if ((hret != H_SUCCESS)  (hret != H_PAGE_REGISTERED))
-   return hret;
+   return hret;
}


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] gianfar: Fix race in TBI/SerDes configuration

2008-10-30 Thread Jeff Garzik

Trent Piepho wrote:

The init_phy() function attaches to the PHY, then configures the
SerDes-TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
(sort of) and is accessed via the gianfar's MDIO registers, using the
functions gfar_local_mdio_read/write(), which don't do any locking.

The previously attached PHY will start a work-queue on a timer, and
probably an irq handler as well, which will talk to the PHY and thus use
the MDIO bus.  This uses phy_read/write(), which have locking, but not
against the gfar_local_mdio versions.

The result is that PHY code will try to use the MDIO bus at the same time
as the SerDes setup code, corrupting the transfers.

Setting up the SerDes before attaching to the PHY will insure that there is
no race between the SerDes code and *our* PHY, but doesn't fix everything.
Typically the PHYs for all gianfar devices are on the same MDIO bus, which
is associated with the first gianfar device.  This means that the first
gianfar's SerDes code could corrupt the MDIO transfers for a different
gianfar's PHY.

The lock used by phy_read/write() is contained in the mii_bus structure,
which is pointed to by the PHY.  This is difficult to access from the
gianfar drivers, as there is no link between a gianfar device and the
mii_bus which shares the same MDIO registers.  As far as the device layer
and drivers are concerned they are two unrelated devices (which happen to
share registers).

Generally all gianfar devices' PHYs will be on the bus associated with the
first gianfar.  But this might not be the case, so simply locking the
gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
code is going to use.

We solve this by having the code that creates the gianfar platform device
look in the device tree for an mdio device that shares the gianfar's
registers.  If one is found the ID of its platform device is saved in the
gianfar's platform data.

A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
ID to search through the platform devices for a gianfar_mdio device with
the right ID.  The platform device's driver data is the mii_bus structure,
which the SerDes setup code can use to lock the current bus.

Signed-off-by: Trent Piepho [EMAIL PROTECTED]
CC: Andy Fleming [EMAIL PROTECTED]
---
 arch/powerpc/sysdev/fsl_soc.c |   26 ++
 drivers/net/gianfar.c |7 +++
 drivers/net/gianfar_mii.c |   21 +
 drivers/net/gianfar_mii.h |3 +++
 include/linux/fsl_devices.h   |3 ++-
 5 files changed, 59 insertions(+), 1 deletions(-)


applied 1-2


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ehea: Add hugepage detection

2008-10-27 Thread Jeff Garzik

Thomas Klein wrote:

All kernel memory which is used for kernel/hardware data transfer must be 
registered
with firmware using memory regions. 16GB hugepages may not be part of a 
memory region
due to firmware restrictions.
This patch modifies the walk_memory_resource callback fn to filter hugepages 
and add
only standard memory to the busmap which is later on used for MR registration.

Signed-off-by: Thomas Klein [EMAIL PROTECTED]
---
This reworked patch accounts for comments I got. It's based on davem's 
net-2.6.git.


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: Fix typo in flow control config option

2008-10-27 Thread Jeff Garzik

Josh Boyer wrote:

The recent build fix for ibm_newemac has a typo in the config
option #ifdef used for disabling flow control.  This corrects
it to the proper Kconfig option name.

Reported-by: Christoph Hellwig [EMAIL PROTECTED]
Signed-off-by: Josh Boyer [EMAIL PROTECTED]

---

diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 2ee2622..901212a 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2605,7 +2605,7 @@ static int __devinit emac_init_config(struct 
emac_instance *dev)
of_device_is_compatible(np, ibm,emac-440gr))
dev-features |= EMAC_FTR_440EP_PHY_CLK_FIX;
if (of_device_is_compatible(np, ibm,emac-405ez)) {
-#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL
+#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL
dev-features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
 #else
printk(KERN_ERR %s: Flow control not disabled!\n,


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] igb: add IGB_DCA instead of selecting INTEL_IOATDMA

2008-10-21 Thread Jeff Garzik

Jeff Kirsher wrote:

Add a bool IGB_DCA defined to y if IGB and DCA are enabled, but IGB isn't y 
while DCA=m.  And thus remove the need to select INTEL_IOATDMA when IGB is 
enabled, so that non-x86 architectures can build the igb driver.
Based on work/patch from Brice Goglin [EMAIL PROTECTED]

Signed-off-by: Jeff Kirsher [EMAIL PROTECTED]


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: Fix new MAL feature handling

2008-10-20 Thread Jeff Garzik

Benjamin Herrenschmidt wrote:

On Thu, 2008-10-16 at 10:38 -0400, Josh Boyer wrote:

On Thu, Oct 16, 2008 at 03:56:50PM +1100, Benjamin Herrenschmidt wrote:

drivers/net/ibm_newemac/mal.c: In function 'mal_txeob':
drivers/net/ibm_newemac/mal.c:284: error: implicit declaration of function 
'mtdcri'
drivers/net/ibm_newemac/mal.c:284: error: 'SDR0' undeclared (first use in this 
function)
drivers/net/ibm_newemac/mal.c:284: error: (Each undeclared identifier is 
reported only once
drivers/net/ibm_newemac/mal.c:284: error: for each function it appears in.)
drivers/net/ibm_newemac/mal.c:285: error: implicit declaration of function 
'mfdcri'
drivers/net/ibm_newemac/mal.c: In function 'mal_rxeob':
drivers/net/ibm_newemac/mal.c:302: error: 'SDR0' undeclared (first use in this 
function)

That's annoying, I'll have a look.

Support for new features needed by the PPC 405EZ boards
introduced some errors in the MAL and EMAC feature handling.
This broke 'allmodconfig' builds as CONFIG_PPC_DCR_NATIVE is
not set for those.

This patch fixes these errors by wrapping the code in the
appropriate #ifdefs.

Signed-off-by: Josh Boyer [EMAIL PROTECTED]


Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---

Jeff, this breaks build, I'll put it in powerpc.git for a merge today,


ACK


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ehea: Fix memory hotplug support

2008-10-16 Thread Jeff Garzik

Hannes Hering wrote:

This patch implements the memory notifier to update the busmap instantly
instead of rebuilding the whole map. This is necessary because
walk_memory_resource provides different information than required during memory
hotplug.

Signed-off-by: Hannes Hering [EMAIL PROTECTED]
---
This patch is based on the current netdev-2.6-git. It supersedes the previous
post ehea: Fix memory hotplug support.
http://www.spinics.net/lists/netdev/msg75413.html


Due to vacation, netdev-2.6.git is stale.  Please regenerate this patch 
against davem's net-2.6.git.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] pata_platform struct resource signness fix

2008-09-28 Thread Jeff Garzik

Anton Vorontsov wrote:

On Thu, Sep 25, 2008 at 06:40:59PM +0800, Li Yang wrote:

On Thu, Sep 25, 2008 at 4:54 PM, Wang Jian [EMAIL PROTECTED] wrote:

The alternative fix can be.

This one is better as 0 is defined as 'invalid irq' for all
architectures.  Added linux-ide and Anton to cc.


Thanks for the correct Cc.

I've sent a patch to fix the issue more than a month ago.

http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg22851.html

Jeff, could you apply the patch?


Can you resend, I don't seem to have it...


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] ehea: fix phyp debugging typo

2008-09-13 Thread Jeff Garzik

Sebastien Dugue wrote:

  Fix typo in ehea_h_query_ehea() which prevents building when DEBUG is on.

Signed-off-by: Sebastien Dugue [EMAIL PROTECTED]
---
 drivers/net/ehea/ehea_phyp.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 156eb63..2a33a61 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -535,7 +535,7 @@ u64 ehea_h_query_ehea(const u64 adapter_handle, void 
*cb_addr)
   cb_logaddr,  /* R5 */
   0, 0, 0, 0, 0);  /* R6-R10 */
 #ifdef DEBUG
-   ehea_dmp(cb_addr, sizeof(struct hcp_query_ehea), hcp_query_ehea);
+   ehea_dump(cb_addr, sizeof(struct hcp_query_ehea), hcp_query_ehea);
 #endif
return hret;


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] ehea: fix mutex and spinlock use

2008-09-13 Thread Jeff Garzik

Sebastien Dugue wrote:

  Looks like to me that the ehea_fw_handles.lock mutex and the
ehea_bcmc_regs.lock spinlock are taken much longer than necessary and could
as well be pushed inside the functions that need them
(ehea_update_firmware_handles() and ehea_update_bcmc_registrations())
rather than at each callsite.

Signed-off-by: Sebastien Dugue [EMAIL PROTECTED]
---
 drivers/net/ehea/ehea_main.c |   26 --
 1 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index b70c531..c765ec6 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -219,9 +219,11 @@ static void ehea_update_firmware_handles(void)
}
 
 out_update:

+   mutex_lock(ehea_fw_handles.lock);
kfree(ehea_fw_handles.arr);
ehea_fw_handles.arr = arr;
ehea_fw_handles.num_entries = i;
+   mutex_unlock(ehea_fw_handles.lock);
 }
 
 static void ehea_update_bcmc_registrations(void)

@@ -293,9 +295,11 @@ static void ehea_update_bcmc_registrations(void)
}
 
 out_update:

+   spin_lock(ehea_bcmc_regs.lock);
kfree(ehea_bcmc_regs.arr);
ehea_bcmc_regs.arr = arr;
ehea_bcmc_regs.num_entries = i;
+   spin_unlock(ehea_bcmc_regs.lock);
 }
 
 static struct net_device_stats *ehea_get_stats(struct net_device *dev)

@@ -1770,8 +1774,6 @@ static int ehea_set_mac_addr(struct net_device *dev, void 
*sa)
 
 	memcpy(dev-dev_addr, mac_addr-sa_data, dev-addr_len);
 
-	spin_lock(ehea_bcmc_regs.lock);

-
/* Deregister old MAC in pHYP */
if (port-state == EHEA_PORT_UP) {
ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
@@ -1792,7 +1794,6 @@ static int ehea_set_mac_addr(struct net_device *dev, void 
*sa)
 
 out_upregs:

ehea_update_bcmc_registrations();
-   spin_unlock(ehea_bcmc_regs.lock);
 out_free:
kfree(cb0);
 out:
@@ -1954,8 +1955,6 @@ static void ehea_set_multicast_list(struct net_device 
*dev)
}
ehea_promiscuous(dev, 0);
 
-	spin_lock(ehea_bcmc_regs.lock);

-
if (dev-flags  IFF_ALLMULTI) {
ehea_allmulti(dev, 1);
goto out;
@@ -1985,7 +1984,6 @@ static void ehea_set_multicast_list(struct net_device 
*dev)
}
 out:
ehea_update_bcmc_registrations();
-   spin_unlock(ehea_bcmc_regs.lock);
return;
 }
 
@@ -2466,8 +2464,6 @@ static int ehea_up(struct net_device *dev)

if (port-state == EHEA_PORT_UP)
return 0;
 
-	mutex_lock(ehea_fw_handles.lock);

-
ret = ehea_port_res_setup(port, port-num_def_qps,
  port-num_add_tx_qps);
if (ret) {
@@ -2504,8 +2500,6 @@ static int ehea_up(struct net_device *dev)
}
}
 
-	spin_lock(ehea_bcmc_regs.lock);

-
ret = ehea_broadcast_reg_helper(port, H_REG_BCMC);
if (ret) {
ret = -EIO;
@@ -2527,10 +2521,8 @@ out:
ehea_info(Failed starting %s. ret=%i, dev-name, ret);
 
 	ehea_update_bcmc_registrations();

-   spin_unlock(ehea_bcmc_regs.lock);
 
 	ehea_update_firmware_handles();

-   mutex_unlock(ehea_fw_handles.lock);
 
 	return ret;

 }
@@ -2580,9 +2572,6 @@ static int ehea_down(struct net_device *dev)
if (port-state == EHEA_PORT_DOWN)
return 0;
 
-	mutex_lock(ehea_fw_handles.lock);

-
-   spin_lock(ehea_bcmc_regs.lock);
ehea_drop_multicast_list(dev);
ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
 
@@ -2591,7 +2580,6 @@ static int ehea_down(struct net_device *dev)

port-state = EHEA_PORT_DOWN;
 
 	ehea_update_bcmc_registrations();

-   spin_unlock(ehea_bcmc_regs.lock);
 
 	ret = ehea_clean_all_portres(port);

if (ret)
@@ -2599,7 +2587,6 @@ static int ehea_down(struct net_device *dev)
  dev-name, ret);
 
 	ehea_update_firmware_handles();

-   mutex_unlock(ehea_fw_handles.lock);
 
 	return ret;

 }
@@ -3378,7 +3365,6 @@ static int __devinit ehea_probe_adapter(struct of_device 
*dev,
ehea_error(Invalid ibmebus device probed);
return -EINVAL;
}
-   mutex_lock(ehea_fw_handles.lock);
 
 	adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);

if (!adapter) {
@@ -3462,7 +3448,6 @@ out_free_ad:
 
 out:

ehea_update_firmware_handles();
-   mutex_unlock(ehea_fw_handles.lock);
return ret;
 }
 
@@ -3481,8 +3466,6 @@ static int __devexit ehea_remove(struct of_device *dev)
 
 	flush_scheduled_work();
 
-	mutex_lock(ehea_fw_handles.lock);

-
ibmebus_free_irq(adapter-neq-attr.ist1, adapter);
tasklet_kill(adapter-neq_tasklet);


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/3] ibm_newemac: Allow the no flow control EMAC feature to work

2008-09-13 Thread Jeff Garzik

Josh Boyer wrote:

Some PowerPC 40x chips have errata that force us not to use the integrated
flow control.  We have the feature defined, but it currently can't be used
because it is never added to EMAC_FTRS_POSSIBLE.

This adds a Kconfig option for affected platforms to select and puts the
feature in the EMAC_FTRS_POSSIBLE list.  This is set for PowerPC 405EZ
platforms as well.

Signed-off-by: Josh Boyer [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/Kconfig |4 
 drivers/net/ibm_newemac/core.c  |2 ++
 drivers/net/ibm_newemac/core.h  |3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)


ACK patches 1-3


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: Add support for GPCS, SGMII and M88E1112 PHY

2008-09-13 Thread Jeff Garzik

Victor Gallardo wrote:

This patch adds GPCS, SGMII and M88E1112 PHY support
for the AMCC PPC460GT/EX processors.

Signed-off-by: Victor Gallardo [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/core.c |   40 +++
 drivers/net/ibm_newemac/core.h |3 +
 drivers/net/ibm_newemac/phy.c  |   84 
 drivers/net/ibm_newemac/phy.h  |2 +
 4 files changed, 120 insertions(+), 9 deletions(-)


ACK, please coordinate with the driver maintainer to get this merged


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] ehea: Fix DLPAR memory handling

2008-09-13 Thread Jeff Garzik

Hannes Hering wrote:

The ehea busmap must be allocated only once in the first of many calls of the
ehea_create_busmap_callback.

Signed-off-by: Hannes Hering [EMAIL PROTECTED]
---

diff -Nurp -X dontdiff linux-2.6.27-rc5/drivers/net/ehea/ehea_qmr.c 
patched_kernel/drivers/net/ehea/ehea_qmr.c
--- linux-2.6.27-rc5/drivers/net/ehea/ehea_qmr.c2008-08-29 
00:52:02.0 +0200
+++ patched_kernel/drivers/net/ehea/ehea_qmr.c  2008-09-05 15:31:30.0 
+0200
@@ -595,7 +595,8 @@ static int ehea_create_busmap_callback(u
end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
mr_len = *(unsigned long *)arg;
 
-	ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);

+   if (!ehea_bmap)
+   ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
if (!ehea_bmap)
return -ENOMEM;


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] ehea: Enable DLPAR memory remove

2008-09-13 Thread Jeff Garzik

Hannes Hering wrote:

This patch adds the capability flag to the capability list for dynamic LPAR
memory remove to enable this feature.

Signed-off-by: Hannes Hering [EMAIL PROTECTED]
---

diff -Nurp -X dontdiff linux-2.6.27-rc5/drivers/net/ehea/ehea.h 
patched_kernel/drivers/net/ehea/ehea.h
--- linux-2.6.27-rc5/drivers/net/ehea/ehea.h2008-08-29 00:52:02.0 
+0200
+++ patched_kernel/drivers/net/ehea/ehea.h  2008-09-05 15:33:12.0 
+0200
@@ -40,13 +40,13 @@
 #include asm/io.h
 
 #define DRV_NAME	ehea

-#define DRV_VERSIONEHEA_0092
+#define DRV_VERSIONEHEA_0093
 
 /* eHEA capability flags */

 #define DLPAR_PORT_ADD_REM 1
 #define DLPAR_MEM_ADD  2
 #define DLPAR_MEM_REM  4
-#define EHEA_CAPABILITIES  (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD)
+#define EHEA_CAPABILITIES  (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD | DLPAR_MEM_REM)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: MAL[12]_IER_EVENTS definition: 2x *_OTE - *_DE

2008-09-03 Thread Jeff Garzik

roel kluin wrote:

MAL[12]_IER_EVENTS definitions have MAL_IER_OTE twice
but lack MAL_IER_DE

Signed-off-by: Roel Kluin [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/mal.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h
index eaa7262..717dc38 100644
--- a/drivers/net/ibm_newemac/mal.h
+++ b/drivers/net/ibm_newemac/mal.h
@@ -102,7 +102,7 @@
 /* MAL V1 IER bits */
 #define   MAL1_IER_NWE 0x0008
 #define   MAL1_IER_SOC_EVENTS  MAL1_IER_NWE
-#define   MAL1_IER_EVENTS  (MAL1_IER_SOC_EVENTS | MAL_IER_OTE | \
+#define   MAL1_IER_EVENTS  (MAL1_IER_SOC_EVENTS | MAL_IER_DE | \
 MAL_IER_OTE | MAL_IER_OE | MAL_IER_PE)
 
 /* MAL V2 IER bits */

@@ -110,7 +110,7 @@
 #define   MAL2_IER_PRE 0x0040
 #define   MAL2_IER_PWE 0x0020
 #define   MAL2_IER_SOC_EVENTS  (MAL2_IER_PT | MAL2_IER_PRE | MAL2_IER_PWE)
-#define   MAL2_IER_EVENTS  (MAL2_IER_SOC_EVENTS | MAL_IER_OTE | \
+#define   MAL2_IER_EVENTS  (MAL2_IER_SOC_EVENTS | MAL_IER_DE | \
 MAL_IER_OTE | MAL_IER_OE | MAL_IER_PE)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: Don't call dev_mc_add() before device is registered

2008-08-27 Thread Jeff Garzik

Benjamin Herrenschmidt wrote:

We must not call dev_mc_add() from within our HW configure which happens
before we initialize and register the netdev. Do it in open() instead.

Thanks to Sebastian Siewior for tracking it down. 


Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---

This fixes an uninitialized spinlock warning (and possibly more).

Please apply.


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] gianfar: Call gfar_halt_nodisable() from gfar_halt().

2008-08-14 Thread Jeff Garzik

Scott Wood wrote:

gfar_halt() was factored out into halting and disabling by commit
d87eb12785c14de1586e3bad86ca2c0991300339, as the suspend() method
only wants to do the former.  However, the call to gfar_halt_nodisable()
from gfar_halt() apparently got lost during the patch respin process.

This adds it back.

Signed-off-by: Scott Wood [EMAIL PROTECTED]
---
 drivers/net/gianfar.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] net/fs_enet: remove redundant messages for performance

2008-08-07 Thread Jeff Garzik

Li Yang wrote:

Currently when we do a packet flood to the Ethernet port, the console
reports error every time when a packet is dropped.  This is too
redundant and cost performance.  Remove message for this type of event.

Signed-off-by: Li Yang [EMAIL PROTECTED]
---
 drivers/net/fs_enet/mac-fcc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 0a97fc2..1c7ef81 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -126,7 +126,7 @@ out:
 #define FCC_NAPI_RX_EVENT_MSK  (FCC_ENET_RXF | FCC_ENET_RXB)
 #define FCC_RX_EVENT   (FCC_ENET_RXF)
 #define FCC_TX_EVENT   (FCC_ENET_TXB)
-#define FCC_ERR_EVENT_MSK  (FCC_ENET_TXE | FCC_ENET_BSY)
+#define FCC_ERR_EVENT_MSK  (FCC_ENET_TXE)
 


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/3] gianfar: Magic Packet and suspend/resume support.

2008-08-07 Thread Jeff Garzik

Scott Wood wrote:

Signed-off-by: Scott Wood [EMAIL PROTECTED]
---
 Documentation/powerpc/booting-without-of.txt |5 +-
 arch/powerpc/sysdev/fsl_soc.c|3 +
 drivers/net/gianfar.c|  118 +-
 drivers/net/gianfar.h|   12 ++-
 drivers/net/gianfar_ethtool.c|   41 +-
 include/linux/fsl_devices.h  |1 +
 6 files changed, 172 insertions(+), 8 deletions(-)


did this ever get ack'd by Kumar?  I don't have a record of it.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc/ibmveth: fix multiple errors with dma_mapping_error conversion

2008-07-30 Thread Jeff Garzik

Stephen Rothwell wrote:

The addition of an argument to dma_mapping_error() in commit
8d8bb39b9eba32dd70e87fd5ad5c5dd4ba118e06 dma-mapping: add the device
argument to dma_mapping_error() left a bit of fallout:

drivers/net/ibmveth.c:263: error: too few arguments to function 
'dma_mapping_error'
drivers/net/ibmveth.c:264: error: expected ')' before 'goto'
drivers/net/ibmveth.c:284: error: expected expression before '}' token
drivers/net/ibmveth.c:297: error: too few arguments to function 
'dma_mapping_error'
drivers/net/ibmveth.c:298: error: expected ')' before 'dma_unmap_single'
drivers/net/ibmveth.c:306: error: expected expression before '}' token
drivers/net/ibmveth.c:491: error: too few arguments to function 
'dma_mapping_error'
drivers/net/ibmveth.c:927: error: too few arguments to function 
'dma_mapping_error'
drivers/net/ibmveth.c:927: error: expected ')' before '{' token
drivers/net/ibmveth.c:974: error: expected expression before '}' token
drivers/net/ibmveth.c:914: error: label 'out' used but not defined m

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
---
 drivers/net/ibmveth.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

Compiler tested for ppc64_defconfig.


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] fs_enet: Remove unused fields in the fs_mii_bb_platform_info structure.

2008-07-22 Thread Jeff Garzik

Laurent Pinchart wrote:

The mdio_port, mdio_bit, mdc_port and mdc_bit fields in the
fs_mii_bb_platform_info structure are left-overs from the move to the Phy
Abstraction Layer subsystem. They are not used anymore and can be safely
removed.

Signed-off-by: Laurent Pinchart [EMAIL PROTECTED]
---
 include/linux/fs_enet_pd.h|4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h
index 9bc045b..decc4b5 100644
--- a/include/linux/fs_enet_pd.h
+++ b/include/linux/fs_enet_pd.h
@@ -103,10 +103,6 @@ struct fs_mii_bb_platform_info {
struct fs_mii_bit   mdio_dir;
struct fs_mii_bit   mdio_dat;
struct fs_mii_bit   mdc_dat;
-   int mdio_port;  /* port  bit for MDIO */
-   int mdio_bit;
-   int mdc_port;   /* port  bit for MDC  */
-   int mdc_bit;
int delay;  /* delay in us */
int irq[32];/* irqs per phy's */


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] fs_enet: MDIO on GPIO support

2008-07-18 Thread Jeff Garzik

Kumar Gala wrote:


On Jul 18, 2008, at 4:26 AM, Laurent Pinchart wrote:


On Thursday 26 June 2008, Vitaly Bordug wrote:

On Thu, 26 Jun 2008 13:21:23 +0200
Laurent Pinchart [EMAIL PROTECTED] wrote:


There should be no dependencies. When the OF GPIO support is not
selected linux/of_gpio.h will define of_get_gpio() as a stub, so the
fs_enet driver will fall back to the legacy binding.


Have we reached a consensus on which tree the patch should go to ?

I think it should go through powerpc tree, not seeing too much
netdev-generic stuff in here. If noone will object, Kumar will pick 
it up I

guess...


Kumar, could you pick it up ? I'd like to see this in 2.6.27.

Best regards,


Jeff said he applied both to his tree already.


Yep, it's already in davem's net-next...

Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] ibm_newemac: Add MII mode support to the EMAC RGMII bridge.

2008-07-10 Thread Jeff Garzik

Benjamin Herrenschmidt wrote:

On Tue, 2008-07-08 at 08:03 -0700, Grant Erickson wrote:

This patch adds support to the RGMII handler in the EMAC driver for
the MII PHY mode such that device tree entries of the form `phy-mode = mii;'
are recognized and handled appropriately.

While logically, in software, gmii and mii modes are the same,
they are wired differently, so it makes sense to allow DTS authors to
specify each explicitly.

Signed-off-by: Grant Erickson [EMAIL PROTECTED]


Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]


ACK



Jeff, I'd like to apply that (and other EMAC patches for 2.6.27, do you
have anything else pending ?) via my tree provided you give me your ack.
The reason is that the multicast fix one is going that way as it touches
other arch files, and subsequent ones are now likely to conflict.

Let me know if that's ok with you in which case I'll stick your ack in
there.


Ok w/ me!

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/3] ehea: fix might sleep problem

2008-07-04 Thread Jeff Garzik

Jan-Bernd Themann wrote:

A mutex has to be replaced by spinlocks as it can be called from
a context which does not allow sleeping.
The kzalloc flag GFP_KERNEL has to be replaced by GFP_ATOMIC
for the same reason.

Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED]


applied 1-3 to 2.6.26


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v3] ibm_newemac: Fixes kernel crashes when speed of cable connected changes

2008-07-04 Thread Jeff Garzik

Stefan Roese wrote:

From: Sathya Narayanan [EMAIL PROTECTED]

The descriptor pointers were not initialized to NIL values, so it was
poiniting to some random addresses which was completely invalid. This
fix takes care of initializing the descriptor to NIL values and clearing
the valid descriptors on clean ring operation.

Signed-off-by: Sathya Narayanan [EMAIL PROTECTED]
Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 5d2108c..ca63fa0 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2719,6 +2719,8 @@ static int __devinit emac_probe(struct of_device *ofdev,
/* Clean rings */
memset(dev-tx_desc, 0, NUM_TX_BUFF * sizeof(struct mal_descriptor));
memset(dev-rx_desc, 0, NUM_RX_BUFF * sizeof(struct mal_descriptor));
+   memset(dev-tx_skb, 0, NUM_TX_BUFF * sizeof(struct sk_buff *));
+   memset(dev-rx_skb, 0, NUM_RX_BUFF * sizeof(struct sk_buff *));
 


applied to 2.6.26


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] ibm_newemac: Fixes entry of short packets

2008-07-04 Thread Jeff Garzik

Stefan Roese wrote:

From: Sathya Narayanan [EMAIL PROTECTED]

Short packets has to be discarded by the driver. So this patch addresses the
issue of discarding the short packets of size lesser then ethernet header
size.

Signed-off-by: Sathya Narayanan [EMAIL PROTECTED]
Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/core.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index ca63fa0..babc79a 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -1636,6 +1636,12 @@ static int emac_poll_rx(void *param, int budget)
goto next;
}
 
+		if (len  ETH_HLEN) {

+   ++dev-estats.rx_dropped_stack;
+   emac_recycle_rx_skb(dev, slot, len);
+   goto next;
+   }
+
if (len  len  EMAC_RX_COPY_THRESH) {


applied 2.6.26


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCHv2] fs_enet: restore promiscuous and multicast settings in restart()

2008-07-04 Thread Jeff Garzik

Laurent Pinchart wrote:

The restart() function is called when the link state changes and resets
multicast and promiscuous settings. This patch restores those settings at the
end of restart().

Signed-off-by: Laurent Pinchart [EMAIL PROTECTED]
---
 drivers/net/fs_enet/mac-fcc.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index e363211..849afbe 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -463,6 +463,9 @@ static void restart(struct net_device *dev)
else
C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB);
 
+	/* Restore multicast and promiscuous settings */

+   set_multicast_list(dev);
+
S32(fccp, fcc_gfmr, FCC_GFMR_ENR | FCC_GFMR_ENT);


applied 2.6.26


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 01/12] pata_mpc52xx: use linux/of_platform.h instead of asm

2008-06-27 Thread Jeff Garzik

Stephen Rothwell wrote:

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
---
 drivers/ata/pata_mpc52xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I am not sure who wants to take this.

diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index bc79df6..a9e8273 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -16,10 +16,10 @@
 #include linux/slab.h
 #include linux/delay.h
 #include linux/libata.h
+#include linux/of_platform.h
 
 #include asm/types.h

 #include asm/prom.h
-#include asm/of_platform.h
 #include asm/mpc52xx.h


ACK.  send it via an arch tree


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 06/12] net: use linux/of_{device,platform}.h instead of asm

2008-06-26 Thread Jeff Garzik

Stephen Rothwell wrote:

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
---
 drivers/net/fs_enet/fs_enet-main.c |2 +-
 drivers/net/fs_enet/mac-scc.c  |2 +-
 drivers/net/fs_enet/mii-fec.c  |2 +-
 drivers/net/ibm_newemac/core.h |2 +-
 drivers/net/ucc_geth.c |2 +-
 drivers/net/ucc_geth_mii.c |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)


ACK

I'll let a ppc person queue this


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH V2] ibm_newemac: Fixes kernel crashes when speed of cable connected changes

2008-06-26 Thread Jeff Garzik

Stefan Roese wrote:

From: Sathya Narayanan [EMAIL PROTECTED]

The descriptor pointers were not initialized to NIL values, so it was
poiniting to some random addresses which was completely invalid. This
fix takes care of initializing the descriptor to NIL values and clearing
the valid descriptors on clean ring operation.

Signed-off-by: Sathya Narayanan [EMAIL PROTECTED]
Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
Changed since V1:
- Fixed off-by-one error in for loops

 drivers/net/ibm_newemac/core.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


I didn't see any answers to ben h's questions?

Holding this patch, waiting for ben's ack...


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] fs_enet: MDIO on GPIO support

2008-06-18 Thread Jeff Garzik

Laurent Pinchart wrote:

Hi Scott,

On Monday 16 June 2008 18:34, Scott Wood wrote:

On Mon, Jun 16, 2008 at 10:57:02AM +0200, Laurent Pinchart wrote:

On Monday 26 May 2008 11:53, Laurent Pinchart wrote:

Port the fs_enet driver to support the MDIO on GPIO driver for PHY
access in addition to the mii-bitbang driver.
Now that 1/2 has been applied by Jeff, could this one make it to 
powerpc-next ?

This patch should probably go through Jeff as well...


Jeff, what's your opinion on this ?


Acked-by: Scott Wood [EMAIL PROTECTED]


-   data = of_get_property(phynode, reg, len);
-   if (!data || len != 4)
-   goto out_put_mdio;
+   bus_id = of_get_gpio(mdionode, 0);
+   if (bus_id  0) {
+   struct resource res;
+   ret = of_address_to_resource(mdionode, 0, res);
+   if (ret)
+   goto out_put_mdio;
+   bus_id = res.start;
+   }
 
-	snprintf(fpi-bus_id, 16, %x:%02x, res.start, *data);

+   snprintf(fpi-bus_id, 16, %x:%02x, bus_id, *data);


What are the patch dependencies, if any?

My general rule is, anytime I see 80%+ of the patch dealing with 
arch-specific API functions (such as OF resource stuff), I tend to 
prefer that goes via an arch tree.


If it's a networking change, of course I'd prefer it came in my direction.

Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_newemac: select CRC32 in Kconfig

2008-06-17 Thread Jeff Garzik

Josh Boyer wrote:

The ibm_newemac driver requires ether_crc to be defined.  Apparently it is
possible to generate a .config without CONFIG_CRC32 set which causes the
following link errors if IBM_NEW_EMAC is selected:

  LD  .tmp_vmlinux1
drivers/built-in.o: In function `emac_hash_mc':
core.c:(.text+0x2f524): undefined reference to `crc32_le'
core.c:(.text+0x2f528): undefined reference to `bitrev32'
make: *** [.tmp_vmlinux1] Error 1

This patch has IBM_NEW_EMAC select CRC32 so we don't hit this error.

Signed-off-by: Josh Boyer [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ibm_emac: Remove the ibm_emac driver

2008-06-17 Thread Jeff Garzik

Josh Boyer wrote:

The arch/ppc sub-tree has been removed in the powerpc git tree.  The old
ibm_emac driver is no longer used by anything as a result of this.  This
removes it, leaving the ibm_newemac driver as the proper driver to use for
PowerPC boards with the EMAC hardware.

Signed-off-by: Josh Boyer [EMAIL PROTECTED]
---
 MAINTAINERS   |8 -
 drivers/net/Kconfig   |1 -
 drivers/net/ibm_emac/Kconfig  |   70 -
 drivers/net/ibm_emac/Makefile |   11 -
 drivers/net/ibm_emac/ibm_emac.h   |  329 -
 drivers/net/ibm_emac/ibm_emac_core.c  | 2263 -
 drivers/net/ibm_emac/ibm_emac_core.h  |  222 
 drivers/net/ibm_emac/ibm_emac_debug.c |  211 ---
 drivers/net/ibm_emac/ibm_emac_debug.h |   62 -
 drivers/net/ibm_emac/ibm_emac_mal.c   |  570 -
 drivers/net/ibm_emac/ibm_emac_mal.h   |  267 
 drivers/net/ibm_emac/ibm_emac_phy.c   |  398 --
 drivers/net/ibm_emac/ibm_emac_phy.h   |   80 --
 drivers/net/ibm_emac/ibm_emac_rgmii.c |  200 ---
 drivers/net/ibm_emac/ibm_emac_rgmii.h |   64 -
 drivers/net/ibm_emac/ibm_emac_tah.c   |  110 --
 drivers/net/ibm_emac/ibm_emac_tah.h   |   87 --
 drivers/net/ibm_emac/ibm_emac_zmii.c  |  253 
 drivers/net/ibm_emac/ibm_emac_zmii.h  |   82 --
 19 files changed, 0 insertions(+), 5288 deletions(-)
 delete mode 100644 drivers/net/ibm_emac/Kconfig
 delete mode 100644 drivers/net/ibm_emac/Makefile
 delete mode 100644 drivers/net/ibm_emac/ibm_emac.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_core.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_core.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_debug.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_debug.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_mal.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_mal.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_phy.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_phy.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_rgmii.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_rgmii.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_tah.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_tah.h
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_zmii.c
 delete mode 100644 drivers/net/ibm_emac/ibm_emac_zmii.h


applied

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] fs_enet: fix checkpatch.pl problems

2008-06-17 Thread Jeff Garzik

John Rigby wrote:

Fixed all errors and warnings that checkpatch.pl
reports if this was a new submission.
Also changed instances of fec_t to struct fec in
mac-fec.c and mii-fec.c.

This is in preparation of adding MPC5121 support.

Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 drivers/net/fs_enet/fs_enet-main.c |   70 ---
 drivers/net/fs_enet/fs_enet.h  |   15 +---
 drivers/net/fs_enet/mac-fcc.c  |7 ++--
 drivers/net/fs_enet/mac-fec.c  |   40 ++--
 drivers/net/fs_enet/mac-scc.c  |   13 ---
 drivers/net/fs_enet/mii-bitbang.c  |4 +-
 drivers/net/fs_enet/mii-fec.c  |   23 +++-
 7 files changed, 95 insertions(+), 77 deletions(-)


patch does not apply


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 10/19] [repost] powerpc: move get_longbusy_msecs out of ehca/ehea

2008-06-13 Thread Jeff Garzik

Brian King wrote:

Jeff,

Regarding the patches Rob just posted here, we'd like to just take them
through the powerpc tree with your sign off since they are part of a
Power platform feature we are enabling.

Thanks,

Brian

Robert Jennings wrote:

From: Robert Jennings [EMAIL PROTECTED]

In support of Cooperative Memory Overcommitment (CMO) this moves
get_longbusy_msecs() out of the ehca and ehea drivers and into the 
architecture's hvcall header as plpar_get_longbusy_msecs.  Some firmware

calls made in pSeries platform iommu code will need to share this
functionality.

Signed-off-by: Robert Jennings [EMAIL PROTECTED]

---

I missed copying netdev on this patch the first time.

 drivers/infiniband/hw/ehca/hcp_if.c |   24 ++--
 drivers/net/ehea/ehea_phyp.c|4 ++--
 drivers/net/ehea/ehea_phyp.h|   20 
 include/asm-powerpc/hvcall.h|   27 +++
 4 files changed, 31 insertions(+), 44 deletions(-)


ACK the quoted patch


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH][2.6.26] ehea: set mac address fix

2008-06-10 Thread Jeff Garzik

Jan-Bernd Themann wrote:

eHEA has to call firmware functions in order to change the mac address
of a logical port. This patch checks if the logical port is up
when calling the register / deregister mac address calls. If the port
is down these firmware calls would fail and are therefore not executed.

Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED]


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [POWERPC] 85xx: MPC85xx MDS - Unconditionally select PHYLIB for board fixups

2008-06-06 Thread Jeff Garzik

Kumar Gala wrote:

The MPC85xx MDS board requires some board level tweaks of the PHYs that
either the eTSEC (gianfar) or UCC ethernet controllers are connected to.

Its possible to build the phylib as a module, however this breaks the
board level fix ups because phy_read and phy_write are not available
if we build as a module.

So we unconditionally select PHYLIB to ensure its built into the kernel
if we are building in MPC85xx MDS support.  This was determined to be
the easiest soultion even though it prevents the user from removing
PHYLIB support if they decide they don't want it.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---

will go via the powerpc.git tree for 2.6.26.

- k

 arch/powerpc/platforms/85xx/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/Kconfig 
b/arch/powerpc/platforms/85xx/Kconfig
index 7ff29d5..ecbe580 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -34,6 +34,7 @@ config MPC85xx_MDS
bool Freescale MPC85xx MDS
select DEFAULT_UIMAGE
select QUICC_ENGINE
+   select PHYLIB
help


ACK


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/3] [2.6.26] ehea: Add dependency to Kconfig

2008-06-03 Thread Jeff Garzik

Badari Pulavarty wrote:

It would be nice to get this resolved for 2.6.26 -- this new
dependency causes working 2.6.25 configs to effectively fail (by
deselecting CONFIG_EHEA during make oldconfig).



When everybody else is happy, I'm happy :)

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/2] ehea: remove dependency on MEMORY_HOTPLUG

2008-06-03 Thread Jeff Garzik

Nathan Lynch wrote:

Now that walk_memory_resource() is available regardless of
MEMORY_HOTPLUG's setting, this dependency is not needed.

Signed-off-by: Nathan Lynch [EMAIL PROTECTED]
---
 drivers/net/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index dd0ec9e..f4182cf 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2426,7 +2426,7 @@ config CHELSIO_T3
 
 config EHEA

tristate eHEA Ethernet support
-   depends on IBMEBUS  INET  SPARSEMEM  MEMORY_HOTPLUG
+   depends on IBMEBUS  INET  SPARSEMEM
select INET_LRO


ACK, please send via appropriate target for memory hotplug stuff


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] phylib: Don't allow core of phylib to build as a module

2008-06-02 Thread Jeff Garzik

Kumar Gala wrote:

The core portions of the phylib aren't capable of being used as
a module.  This isn't really any different than something like i2c
in that the bus driver and core need to be built into the kernel.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---

Jeff, please consider this for 2.6.26 as w/o it we get build issues
if phylib is config'd as a module on ppc.

 drivers/net/phy/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 6eb2d31..ab04cc7 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -3,7 +3,7 @@
 #

 menuconfig PHYLIB
-   tristate PHY Device support and infrastructure
+   bool PHY Device support and infrastructure
depends on !S390
depends on NET_ETHERNET


What are the issues?

The core _should_ be able to be built as a module.

Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] phylib: Don't allow core of phylib to build as a module

2008-06-02 Thread Jeff Garzik

Kumar Gala wrote:


On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote:


Kumar Gala wrote:

The core portions of the phylib aren't capable of being used as
a module.  This isn't really any different than something like i2c
in that the bus driver and core need to be built into the kernel.
Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
Jeff, please consider this for 2.6.26 as w/o it we get build issues
if phylib is config'd as a module on ppc.
drivers/net/phy/Kconfig |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 6eb2d31..ab04cc7 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -3,7 +3,7 @@
#
menuconfig PHYLIB
-tristate PHY Device support and infrastructure
+bool PHY Device support and infrastructure
depends on !S390
depends on NET_ETHERNET


What are the issues?

The core _should_ be able to be built as a module.


The core provides functions like phy_read/phy_write.  Andy has recently 
introduced board level workaround/fixups.  The problem is these 
workarounds tend to use phy_read/phy_write and the board/platform code 
is not built as modules.


So we get errors like:

arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups':
/home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:99: 
undefined reference to `phy_write'
/home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:104: 
undefined reference to `phy_read'


The whole world isn't embedded ppc, we use this stuff elsewhere too.

You guys need to figure out something that doesn't require phylib be 
built-in on ALL platforms, but only the platforms that require it.


Or, update the platform to not require built-in -- convert the board 
code to function pointers, and execute them later on somehow, for example.


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] phylib: Don't allow core of phylib to build as a module

2008-06-02 Thread Jeff Garzik

Kumar Gala wrote:


On Jun 2, 2008, at 11:39 AM, Jeff Garzik wrote:


Kumar Gala wrote:

On Jun 2, 2008, at 11:03 AM, Jeff Garzik wrote:

Kumar Gala wrote:

The core portions of the phylib aren't capable of being used as
a module.  This isn't really any different than something like i2c
in that the bus driver and core need to be built into the kernel.
Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
Jeff, please consider this for 2.6.26 as w/o it we get build issues
if phylib is config'd as a module on ppc.
drivers/net/phy/Kconfig |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 6eb2d31..ab04cc7 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -3,7 +3,7 @@
#
menuconfig PHYLIB
-tristate PHY Device support and infrastructure
+bool PHY Device support and infrastructure
   depends on !S390
   depends on NET_ETHERNET


What are the issues?

The core _should_ be able to be built as a module.
The core provides functions like phy_read/phy_write.  Andy has 
recently introduced board level workaround/fixups.  The problem is 
these workarounds tend to use phy_read/phy_write and the 
board/platform code is not built as modules.

So we get errors like:
arch/powerpc/platforms/built-in.o: In function `mpc8568_mds_phy_fixups':
/home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:99: 
undefined reference to `phy_write'
/home/galak/git/master/powerpc/arch/powerpc/platforms/85xx/mpc85xx_mds.c:104: 
undefined reference to `phy_read'


The whole world isn't embedded ppc, we use this stuff elsewhere too.

You guys need to figure out something that doesn't require phylib be 
built-in on ALL platforms, but only the platforms that require it.


I wasn't suggesting we build it always, just not let it be built as a 
module.


I was saying, you are requiring everyone to bloat their kernel with 
phylib, if they enable phylib, because of your particular platform details.


That is not a path we want to follow -- limiting everyone else because 
of one case is not acceptable.


Jeff




___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] phylib: Don't allow core of phylib to build as a module

2008-06-02 Thread Jeff Garzik

Andy Fleming wrote:

I'm partial to the select-it-if-you-need-it paradigm.



AFAICS this can all be solved by the platform Kconfig ensuring that phylib=y

Jeff


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Add port multiplier (PMP) support in sata_fsl driver

2008-05-30 Thread Jeff Garzik

Kumar Gala wrote:

From: Ashish Kalra [EMAIL PROTECTED]

PMP support for sata_fsl driver.

Signed-off-by: Ashish Kalra [EMAIL PROTECTED]
---
Jeff,

The following commit (4c9bf4e799ce06a7378f1196587084802a414c03):
libata: replace tf_read with qc_fill_rtf for non-SFF drivers

Broke the sata_fsl.c driver in 2.6.26.  I know the following patch fixes
the issue, it clearly also adds port multipler support.  I'm not sure if
you are willing to take that as part of 2.6.26 or not, but the current
2.6.26 driver is broken.

On boot with debug enabled we get something like (w/o this patch):

spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1
spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1
spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1

.. continues for ever.

- k

 drivers/ata/sata_fsl.c |  224 +++-
 1 files changed, 163 insertions(+), 61 deletions(-)



applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] net: OpenFirmware GPIO based MDIO bitbang driver

2008-05-30 Thread Jeff Garzik

Laurent Pinchart wrote:

This patch adds an MDIO bitbang driver that uses the GPIO library and its
OF bindings to access the bus I/Os.

Signed-off-by: Laurent Pinchart [EMAIL PROTECTED]
---
 Documentation/powerpc/booting-without-of.txt |   21 +++
 drivers/net/phy/Kconfig  |6 +
 drivers/net/phy/Makefile |1 +
 drivers/net/phy/mdio-ofgpio.c|  205 ++
 4 files changed, 233 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/mdio-ofgpio.c


applied 1-2


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/1] ehea: Fix use after free on reboot

2008-05-22 Thread Jeff Garzik

Brian King wrote:

Fixes the following use after free oops:

ehea: Reboot: freeing all eHEA resources
Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6b6c5b
Faulting instruction address: 0xd0354488
cpu 0x0: Vector: 300 (Data Access) at [c0002ec6f310]
pc: d0354488: .ehea_shutdown_single_port+0x50/0x78 [ehea]
lr: d035447c: .ehea_shutdown_single_port+0x44/0x78 [ehea]
sp: c0002ec6f590
   msr: 80009032
   dar: 6b6b6b6b6b6b6c5b
 dsisr: 4000
  current = 0xc000281412e0
  paca= 0xc06df300
pid   = 10930, comm = reboot
enter ? for help
[c0002ec6f590] d035d64c .ehea_remove+0x44/0x124 [ehea] (unreliable)
[c0002ec6f630] c0319f88 .of_platform_device_remove+0x40/0x58
[c0002ec6f6a0] c0291018 .__device_release_driver+0xb0/0xf0
[c0002ec6f730] c0291120 .driver_detach+0xc8/0xfc
[c0002ec6f7c0] c028fe24 .bus_remove_driver+0xb4/0x114
[c0002ec6f850] c0291768 .driver_unregister+0x54/0x74
[c0002ec6f8e0] c031a0c8 .of_unregister_driver+0x14/0x28
[c0002ec6f950] c0023ba0 .ibmebus_unregister_driver+0x10/0x24
[c0002ec6f9c0] d0354180 .ehea_reboot_notifier+0x30/0x4c [ehea]
[c0002ec6fa40] c03c95a8 .notifier_call_chain+0x5c/0xcc
[c0002ec6fae0] c0082cd4 .__blocking_notifier_call_chain+0x70/0xb0
[c0002ec6fb90] c0075cf8 .kernel_restart_prepare+0x24/0x58
[c0002ec6fc10] c0075f0c .kernel_restart+0x20/0x6c
[c0002ec6fc90] c0078674 .sys_reboot+0x1d4/0x290
[c0002ec6fe30] c00086ac syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 0ff63a40
SP (ffceea50) is in userspace

Signed-off-by: Brian King [EMAIL PROTECTED]


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 4/6] drivers/net/fs_enet: remove null pointer dereference

2008-05-22 Thread Jeff Garzik

Julia Lawall wrote:

From: Julia Lawall [EMAIL PROTECTED]

The following code appears in the function fs_init_instance in the file 
drivers/net/fs_enet/fs_enet-main.c.

if (fep-ops == NULL) {
printk(KERN_ERR DRV_MODULE_NAME
   : %s No matching ops found (%d).\n,
   ndev-name, fpi-fs_no);
err = -EINVAL;
goto err;
}

This code implies that at the point of err, fep-ops can be NULL, so an
extra test is needed before dereferencing this value.


This problem was found using the following semantic match
(http://www.emn.fr/x-info/coccinelle/)

// smpl
@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
  ... when != if (E == NULL) S1 else S2
  when != E = E1
* E-f
  ... when any
  return ...;
}
else S3
// /smpl

Signed-off-by: Julia Lawall [EMAIL PROTECTED]


applied

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/3] [2.6.26] memory: Introduce exports for memory notifiers

2008-05-12 Thread Jeff Garzik

Hannes Hering wrote:

This patch introduces two exports to allow modules to use memory notifiers.

Signed-off-by: Hannes Hering [EMAIL PROTECTED]
---

diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 8ce6de5..937e825 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -53,11 +53,13 @@ int register_memory_notifier(struct notifier_block *nb)
 {
 return blocking_notifier_chain_register(memory_chain, nb);
 }
+EXPORT_SYMBOL(register_memory_notifier);
 
 void unregister_memory_notifier(struct notifier_block *nb)

 {
 blocking_notifier_chain_unregister(memory_chain, nb);
 }
+EXPORT_SYMBOL(unregister_memory_notifier);


applied 1-3


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/3] [NET] uli526x: initialize the hardware prior to requesting interrupts

2008-05-06 Thread Jeff Garzik

Anton Vorontsov wrote:

The firmware on MPC8610HPCD boards enables ULI ethernet and leaves it
in some funky state before booting Linux. For drivers, it's always good
idea to (re)initialize the hardware prior to requesting interrupts.

This patch fixes the following oops:

Oops: Kernel access of bad area, sig: 11 [#1]
MPC86xx HPCD
NIP: c0172820 LR: c017287c CTR: 
[...]
NIP [c0172820] allocate_rx_buffer+0x2c/0xb0
LR [c017287c] allocate_rx_buffer+0x88/0xb0
Call Trace:
[df82bdc0] [c017287c] allocate_rx_buffer+0x88/0xb0 (unreliable)
[df82bde0] [c0173000] uli526x_interrupt+0xe4/0x49c
[df82be20] [c0045418] request_irq+0xf0/0x114
[df82be50] [c01737b0] uli526x_open+0x48/0x160
[df82be70] [c0201184] dev_open+0xb0/0xe8
[df82be80] [c0200104] dev_change_flags+0x90/0x1bc
[df82bea0] [c035fab0] ip_auto_config+0x214/0xef4
[df82bf60] [c03421c8] kernel_init+0xc4/0x2ac
[df82bff0] [c0010834] kernel_thread+0x44/0x60
Instruction dump:
4e800020 9421ffe0 7c0802a6 bfa10014 7c7e1b78 90010024 80030060 83e30054
2b80002f 419d0078 3fa0c039 4858 907f0010 80630088 2f83 419e0014

Signed-off-by: Anton Vorontsov [EMAIL PROTECTED]
---
 drivers/net/tulip/uli526x.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


applied 1-2


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Delete unused fec_8xx net driver

2008-05-06 Thread Jeff Garzik

Becky Bruce wrote:

This driver has been superseded by fs_enet and is no longer in use.

Signed-off-by: Becky Bruce [EMAIL PROTECTED]


I cannot make an informed judgement on this.

ACK, and pass through platform tree, if all platform peeps are happy.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] devres: support addresses greater than an unsigned long via dev_ioremap

2008-04-29 Thread Jeff Garzik

Tejun Heo wrote:

Kumar Gala wrote:

Use a resource_size_t instead of unsigned long since some arch's are
capable of having ioremap deal with addresses greater than the size of a
unsigned long.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]


Acked-by: Tejun Heo [EMAIL PROTECTED]


Fine with me, too.

I think devres changes should go via GregKH (device core) or Jesse (PCI) 
rather than my libata tree, unless there are obvious dependencies...


Jeff



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/6] ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch

2008-04-25 Thread Jeff Garzik

Benjamin Herrenschmidt wrote:

From: Stefan Roese [EMAIL PROTECTED]

This fixes the jumbo frame support on EMAC V4 systems. Now the correct
bit is set depending on the EMAC version configured.

Tested on Kilauea (405EX) and Canyonlands (460EX).

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]

---
 drivers/net/ibm_newemac/core.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 0789802..486901f 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -524,7 +524,10 @@ static int emac_configure(struct emac_instance *dev)
rx_size = dev-rx_fifo_size_gige;
 
 		if (dev-ndev-mtu  ETH_DATA_LEN) {

-   mr1 |= EMAC_MR1_JPSM;
+   if (emac_has_feature(dev, EMAC_FTR_EMAC4))
+   mr1 |= EMAC4_MR1_JPSM;
+   else
+   mr1 |= EMAC_MR1_JPSM;
dev-stop_timeout = STOP_TIMEOUT_1000_JUMBO;
} else
dev-stop_timeout = STOP_TIMEOUT_1000;


applied 1-6


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 04/15] [PPC] minor irq handler cleanups

2008-04-18 Thread Jeff Garzik
- whitespace cleanups

- remove pointless prototype (uses always follow func implementation)

- 'irq' argument is often used purely as a local variable.  rename
  argument to 'dummy' and define 'irq' as local to make this plain.

- remove pointless casts from void*

This change's main purpose is to prepare for the patchset in
jgarzik/misc-2.6.git#irq-remove, that explores removal of the
never-used 'irq' argument in each interrupt handler.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 arch/ppc/8xx_io/fec.c|3 +--
 arch/ppc/platforms/sbc82xx.c |4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 11b0aa6..d7b7ba9 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -199,7 +199,6 @@ static int fec_enet_start_xmit(struct sk_buff *skb, struct 
net_device *dev);
 #ifdef CONFIG_USE_MDIO
 static void fec_enet_mii(struct net_device *dev);
 #endif /* CONFIG_USE_MDIO */
-static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
 #ifdef CONFIG_FEC_PACKETHOOK
 static void  fec_enet_tx(struct net_device *dev, __u32 regval);
 static void  fec_enet_rx(struct net_device *dev, __u32 regval);
@@ -472,7 +471,7 @@ fec_timeout(struct net_device *dev)
  * This is called from the MPC core interrupt.
  */
 static irqreturn_t
-fec_enet_interrupt(int irq, void * dev_id)
+fec_enet_interrupt(int irq, void *dev_id)
 {
struct  net_device *dev = dev_id;
volatile fec_t  *fecp;
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index cc0935c..0df6aac 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -121,8 +121,10 @@ struct hw_interrupt_type sbc82xx_i8259_ic = {
.end = sbc82xx_i8259_end_irq,
 };
 
-static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id)
+static irqreturn_t sbc82xx_i8259_demux(int dummy, void *dev_id)
 {
+   int irq;
+
spin_lock(sbc82xx_i8259_lock);
 
sbc82xx_i8259_map[0] = 0x0c;/* OCW3: Read IR register on RD# pulse 
*/
-- 
1.5.4.1

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] natsemi: fix MMIO for PPC 44x platforms

2008-04-16 Thread Jeff Garzik

Sergei Shtylyov wrote:

The driver stores the PCI resource address into 'unsigned long' variable before
calling ioremap()  on it. This warrants a kernel oops when the registers are
accessed on PPC 44x platforms which (being 32-bit) have PCI memory space mapped
beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI memory resources are mapped below 4 GB, but arch/powerpc/ code got rid of
this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]

---
Reposting the patch with the typecast, log, and summary corrected.
This is the same issue as the one that has been recently addressed by commits
3c34ac36ac1084e571ef9b6fb1d6a5b10ccc1fd0 (e1000: Fix for 32 bits platforms with
64 bits resources) and c976816b6e901341ec3c4653147316c15549a1c4 (siimage: fix
kernel oops on PPC 44x).  The patch has only been compile tested though...

 drivers/net/natsemi.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] natsemi: fix for PPC 44x platforms

2008-04-12 Thread Jeff Garzik

Sergei Shtylyov wrote:

The driver stores the the PCI resource address into 'unsigned long' variable
before calling ioremap() on it. This warrants kernel oops when the registers
are accessed on PPC 44x platforms which (being 32-bit) have PCI memory space
mapped beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion of the
PCI I/O and memory resources are mapped below 4 GB, but arch/powerpc/ code got
rid of this trick, having instead CONFIG_RESOURCES_64BIT enabled.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]

---
This is the same issue as the one that has been recently addressed by commits
3c34ac36ac1084e571ef9b6fb1d6a5b10ccc1fd0 (e1000: Fix for 32 bits platforms with
64 bits resources) and c976816b6e901341ec3c4653147316c15549a1c4 (siimage: fix
kernel oops on PPC 44x).  The patch has only been compile tested though...

 drivers/net/natsemi.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/natsemi.c
===
--- linux-2.6.orig/drivers/net/natsemi.c
+++ linux-2.6/drivers/net/natsemi.c
@@ -786,7 +786,8 @@ static int __devinit natsemi_probe1 (str
struct netdev_private *np;
int i, option, irq, chip_idx = ent-driver_data;
static int find_cnt = -1;
-   unsigned long iostart, iosize;
+   resource_size_t iostart;
+   unsigned long iosize;
void __iomem *ioaddr;
const int pcibar = 1; /* PCI base address register */
int prev_eedata;
@@ -946,9 +947,9 @@ static int __devinit natsemi_probe1 (str
goto err_create_file;
 
 	if (netif_msg_drv(np)) {

-   printk(KERN_INFO natsemi %s: %s at %#08lx 
+   printk(KERN_INFO natsemi %s: %s at %#08llx 
   (%s), %s, IRQ %d,
-  dev-name, natsemi_pci_info[chip_idx].name, iostart,
+  dev-name, natsemi_pci_info[chip_idx].name, (u64)iostart,
   pci_name(np-pci_dev), print_mac(mac, dev-dev_addr), 
irq);
if (dev-if_port == PORT_TP)


ACK, with the cast fixed (to long long)


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] ehea: Fix DLPAR memory add support

2008-04-12 Thread Jeff Garzik

Thomas Klein wrote:

This patch fixes two weaknesses in send/receive packet handling which may
lead to kernel panics during DLPAR memory add operations.

Signed-off-by: Thomas Klein [EMAIL PROTECTED]


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 1/2] ibm_newemac: PowerPC 440GX EMAC PHY clock workaround

2008-04-12 Thread Jeff Garzik

Josh Boyer wrote:

On Fri, 28 Mar 2008 22:18:25 -0400
Jeff Garzik [EMAIL PROTECTED] wrote:


Valentine Barshak wrote:

The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout error)
if there's no link. Because of that it fails to find PHY chip. The older 
ibm_emac
driver had a workaround for that: the EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL 
macros,
which toggle the Ethernet Clock Select bit in the SDR0_MFR register. This patch
does the same for ibm,emac-440gx compatible chips. The workaround forces
clock on -all- EMACs, so we select clock under global emac_phy_map_lock.

Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 drivers/net/ibm_newemac/core.c |   16 +++-
 drivers/net/ibm_newemac/core.h |8 ++--
 2 files changed, 21 insertions(+), 3 deletions(-)

is this for 2.6.25-rc?


Jeff, can I get an ack from you on this patch, and patch 2 in this
set?  They depend on a patch in my tree and I'd like to include them in
my next push to Paul for 2.6.26.


ACK

I had queried the status of these patches, and didn't receive any reply 
initially from my query...



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] fs_enet: Don't call NAPI functions when NAPI is not used.

2008-04-11 Thread Jeff Garzik

Laurent Pinchart wrote:

fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.

Signed-off-by: Laurent Pinchart [EMAIL PROTECTED]
---
 drivers/net/fs_enet/fs_enet-main.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index c83bd65..1801ce3 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
 
 	netif_stop_queue(dev);

netif_carrier_off(dev);
-   napi_disable(fep-napi);
+   if (fep-fpi-use_napi)
+   napi_disable(fep-napi);
phy_stop(fep-phydev);


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [patch] PS3: Fix gelic net module dependency

2008-04-09 Thread Jeff Garzik

Geoff Levand wrote:

The PS3 gelic network driver depends on the wake-on-lan support
provided by the PS3 sys manager driver.  Add that dependency
to the GELIC_NET Kconfig option.

Prevents these build errors:

  ps3_gelic_net.c:1277: undefined reference to `.ps3_sys_manager_get_wol'
  ps3_gelic_net.c:1337: undefined reference to `.ps3_sys_manager_set_wol'

CC: Masakazu Mokuno [EMAIL PROTECTED]
CC: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Geoff Levand [EMAIL PROTECTED]
---
Hi Paul,

This fixes an error introduced in my 2.6.26 WOL patches now
queued in your powerpc tree.  Please apply.

-Geoff

 drivers/net/Kconfig |1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2358,6 +2358,7 @@ config TSI108_ETH
 config GELIC_NET
tristate PS3 Gigabit Ethernet driver
depends on PPC_PS3
+   select PS3_SYS_MANAGER
help
  This driver supports the network device on the PS3 game
  console.  This driver has built-in support for Ethernet.


looks sane to me, but I do not have enough knowledge to ACK.  Thanks for 
the CC :)



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 3/3] sata_fsl: reduce compatibility to fsl,pq-sata

2008-03-28 Thread Jeff Garzik

Kumar Gala wrote:


On Mar 28, 2008, at 10:51 AM, Kim Phillips wrote:

as prescribed in Documentation/powerpc/booting-without-of.txt.

Signed-off-by: Kim Phillips [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
---


Jeff, I'll take this via the powerpc tree if you don't have any issue.


ACK


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [patch 6/6] PS3: Gelic network driver Wake-on-LAN support

2008-03-28 Thread Jeff Garzik

Geoff Levand wrote:

From: Masakazu Mokuno [EMAIL PROTECTED]

Add Wake-on-LAN support to the PS3 Gelic network driver.
Other OS WOL support was introduced in PS3 system firmware
2.20.

Signed-off-by: Masakazu Mokuno [EMAIL PROTECTED]
Signed-off-by: Geoff Levand [EMAIL PROTECTED]
---
 drivers/net/ps3_gelic_net.c |   81 
 drivers/net/ps3_gelic_net.h |   20 ++
 2 files changed, 101 insertions(+)


ACK


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Make pasemi_mac.c depend on PPC_PASEMI to prevent link errors

2008-03-28 Thread Jeff Garzik

Michael Ellerman wrote:

drivers/net/pasemi_mac.c is enabled by CONFIG_PASEMI_MAC, which depends on
PPC64  PCI. However pasemi_mac.c uses several routines that are only
built when PPC_PASEMI is selected. This can lead to an unbuildable config:

 ERROR: .pasemi_dma_start_chan [drivers/net/pasemi_mac.ko] undefined!

So make CONFIG_PASEMI_MAC depend on PPC_PASEMI instead of PPC64.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
---
 drivers/net/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)



Jeff, pending Olof's ack, this would be nice for 25, but is obviously
not super important.

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index fe7b5ec..3a0b20a 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2635,7 +2635,7 @@ config NIU
 
 config PASEMI_MAC

tristate PA Semi 1/10Gbit MAC
-   depends on PPC64  PCI
+   depends on PPC_PASEMI  PCI
select PHYLIB


applied


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


  1   2   3   >