Re: [PATCH 2/12] smc911x: Fix SMC_WRITE_EEPROM_CMD macro
Hi, Send again with this time to netdev also. I didnt notice Steve not including netdev in the first place. Hi Francois/Bora, Macro abuse. It should be a function. Yes but I got smc911x.h and smc91x.h as a basis. In the smc911x.c there are macros which is longer than it, e.g. SMC_GET_MII. In the same way, smc91x.h contains even more longer like SMC_PUSH_DATA. But, of course, it doesnt mean they are correct. At SMSC (with help from ARM) we tidied up and posted our smsc911x driver to the netdev list. This uses a more 2.6 style, supports more devices, contains additional workarounds for hardware issues and works on !arm. I don't think Jeff has included this in 2.6 yet, so let me know if you would like a copy. I tracked your mails from archives. Well, as said, which one will be stay at the kernel, Dustin's or SMSC's? Because I have additional patches againist to in-kernel driver and maybe some more in the future. Our board is MIPS based. PS: I am happy if you send me your patches privately... -- Bora SAHIN - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/12] smc911x: Fix SMC_WRITE_EEPROM_CMD macro
[EMAIL PROTECTED] [EMAIL PROTECTED] : [...] Do you think if I convert them(smc911x.h) to static inline, would that be correct ? Yes. You can probably forget 'inline'. -- Ueimor - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/12] smc911x: Fix SMC_WRITE_EEPROM_CMD macro
SMC_WRITE_EEPROM_CMD macro is wrong Signed-off-by: Bora Sahin [EMAIL PROTECTED] Index: linux-2.6.18-rc4/drivers/net/smc911x.h === --- linux-2.6.18-rc4.orig/drivers/net/smc911x.h 2006-08-06 21:20:11.0 +0300 +++ linux-2.6.18-rc4/drivers/net/smc911x.h 2006-08-24 12:23:10.0 +0300 @@ -827,9 +828,13 @@ #define SMC_WRITE_EEPROM_CMD(cmd, addr) \ do {\ - while (SMC_GET_E2P_CMD() MAC_CSR_CMD_CSR_BUSY_); \ - SMC_SET_MAC_CMD(MAC_CSR_CMD_R_NOT_W_ | a ); \ - while (SMC_GET_MAC_CMD() MAC_CSR_CMD_CSR_BUSY_); \ + while (SMC_GET_E2P_CMD() E2P_CMD_EPC_BUSY_) \ + cpu_relax();\ + SMC_SET_E2P_DATA((v) 0xFF); \ + SMC_SET_E2P_CMD(E2P_CMD_EPC_BUSY_ | \ + (cmd) 28 | ((addr) 0xFF)); \ + while (SMC_GET_E2P_CMD() E2P_CMD_EPC_BUSY_) \ + cpu_relax();\ } while (0) #endif /* _SMC911X_H_ */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/12] smc911x: Fix SMC_WRITE_EEPROM_CMD macro
[EMAIL PROTECTED] [EMAIL PROTECTED] : [...] #define SMC_WRITE_EEPROM_CMD(cmd, addr) \ do {\ - while (SMC_GET_E2P_CMD() MAC_CSR_CMD_CSR_BUSY_); \ - SMC_SET_MAC_CMD(MAC_CSR_CMD_R_NOT_W_ | a ); \ - while (SMC_GET_MAC_CMD() MAC_CSR_CMD_CSR_BUSY_); \ + while (SMC_GET_E2P_CMD() E2P_CMD_EPC_BUSY_) \ + cpu_relax();\ + SMC_SET_E2P_DATA((v) 0xFF); \ + SMC_SET_E2P_CMD(E2P_CMD_EPC_BUSY_ | \ + (cmd) 28 | ((addr) 0xFF)); \ + while (SMC_GET_E2P_CMD() E2P_CMD_EPC_BUSY_) \ + cpu_relax();\ } while (0) Macro abuse. It should be a function. -- Ueimor - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html