From: Larry F. <Lar...@lw...> - 2012-05-13 02:07:22
|
Signed-off-by: Larry Finger <Lar...@lw...> --- mem-inlines.h | 20 ++++++++++---------- mem.c | 16 ++++++++-------- mem.h | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mem-inlines.h b/mem-inlines.h index a1ac7d6..cdcec3f 100644 --- a/mem-inlines.h +++ b/mem-inlines.h @@ -16,7 +16,7 @@ * Locking in mem is more complex as for pci, because the different * data-access functions below need to be protected against incoming * interrupts. - * + * * Data-access on the mem device is always going in serveral, * none-atomic steps, involving 2 or more register writes * (e.g. ACX_SLV_REG_ADDR, ACX_SLV_REG_DATA). @@ -25,41 +25,41 @@ * ongoing, this may give access interference with by the involved * operations, since the irq routine is also using the same * data-access functions. - * + * * In case of interference, this often manifests during driver * operations as failure of device cmds and subsequent hanging of the * device. It especially appeared during sw-scans while a connection * was up. - * + * * For this reason, irqs shall be off while data access functions are * executed, and for this we'll use the acx-spinlock. * * In pci we don't have this problem, because all data-access * functions are atomic enough and we use dma (and the sw-scan problem * is also not observed in pci, which indicates confirmation). - * + * * Apart from this, the pure acx-sem locking is already coordinating * accesses well enough, that simple driver operation without * inbetween scans work without problems. * * Different locking approaches a possible to solves this (e.g. fine * vs coarse-grained). - * + * * The chosen approach is: - * + * * 1) Mem.c data-access functions contain all a check to insure, they * are executed under the acx-spinlock. => This is the red line that * tells, if something needs coverage. - * + * * 2) The scope of acx-spinlocking is local, in this case here only to * mem.c. All common.c functions are already protected by the sem. * * 3) In order to consolidate locking calls and also to account for * the logic of the various write_flush() calls around, locking in mem * should be: - * + * * a) as coarse-grained as possible, and ... - * + * * b) ... as fine-grained as required. Basically that means, that * before functions, that sleep, unlocking needs to be done. And * locking is taken up again inside the sleeping @@ -102,7 +102,7 @@ do { \ #endif typedef enum { - ACX_SOFT_RESET = 0x0000, + ACX_SOFT_RESET = 0x0000, ACX_SLV_REG_ADDR = 0x0004, ACX_SLV_REG_DATA = 0x0008, ACX_SLV_REG_ADATA = 0x000c, diff --git a/mem.c b/mem.c index a6abe99..d936d0a 100644 --- a/mem.c +++ b/mem.c @@ -166,8 +166,8 @@ void acxmem_dump_mem(acx_device_t *adev, u32 start, int length) /* * BOM Data Access - * - * => See locking comment above + * + * => See locking comment above * ================================================== */ @@ -922,7 +922,7 @@ int acxmem_proc_diag_output(struct seq_file *file, else seq_printf(file, "%02u busy (%02X)%-7s%-7s", i, Ctl_8, thd, ttl); - + seq_printf(file, "%0lx: %04x %04x %04x %04x %04x %04x %04x %04x %04x %04x %02x %02x %02x %02x " "%02x %02x %02x %02x %04x: ", (ulong) txdesc, @@ -934,7 +934,7 @@ int acxmem_proc_diag_output(struct seq_file *file, txd.ack_failures, txd.rts_failures, txd.rts_ok, txd.u.r1.rate, txd.u.r1.queue_ctrl, txd.queue_info); - + tmp = read_slavemem32(adev, (ulong) & (txdesc->AcxMemPtr)); seq_printf(file, " %04x: ", tmp); @@ -1702,9 +1702,9 @@ STATick irqreturn_t acxmem_interrupt(int irq, void *dev_id) /* OW 20091129 TODO Currently breaks mem.c ... * If sleeping is required like for update card settings, this is usefull * For now I replaced sleeping for command handling by mdelays. - * if (adev->after_interrupt_jobs){ - * acx_e_after_interrupt_task(adev); - * } + * if (adev->after_interrupt_jobs){ + * acx_e_after_interrupt_task(adev); + * } */ @@ -2628,7 +2628,7 @@ STATick struct platform_driver acxmem_driver = { }, .probe = acxmem_probe, .remove = __devexit_p(acxmem_remove), - + #ifdef CONFIG_PM .suspend = acxmem_e_suspend, .resume = acxmem_e_resume diff --git a/mem.h b/mem.h index 4dbe303..f61d7ff 100644 --- a/mem.h +++ b/mem.h @@ -77,7 +77,7 @@ static inline void acxmem_chaincopy_from_slavemem(acx_device_t *adev, //static inline int acxmem_write_fw(acx_device_t *adev, // const firmware_image_t *fw_image, u32 offset) //{ return 0; } - + static inline void acxmem_reset_mac(acx_device_t *adev) { } -- 1.7.9.2 |