add redboot parsing and rtl8169 fixes, enable r8169 and add the free ixp4xx ethernet driver - the later still needs fixes and testing for the gateway 7001
SVN-Revision: 5311master
parent
2d2179f503
commit
93ab44d5d6
@ -0,0 +1,61 @@ |
||||
--- linux-2.6.18/drivers/mtd/redboot.c.orig 2006-10-23 11:41:56.000000000 -0400
|
||||
+++ linux-2.6.18/drivers/mtd/redboot.c 2006-10-23 11:42:09.000000000 -0400
|
||||
@@ -92,22 +92,47 @@
|
||||
* swab32(erasesize) then we know we are looking at
|
||||
* a byte swapped FIS directory - swap all the entries!
|
||||
* (NOTE: this is 'size' not 'data_length'; size is
|
||||
- * the full size of the entry.)
|
||||
+ * the full size of the entry.)
|
||||
+ *
|
||||
+ * Handle cases where the FIS directory is less than
|
||||
+ * a full erase block (like combine FIS directory
|
||||
+ * and RedBoot config).
|
||||
+ *
|
||||
+ * IMHO the best solution would be to compute the
|
||||
+ * flash address of the RedBoot FIS directory and
|
||||
+ * compare that with the entry in the FIS directory
|
||||
+ * entry swabbed. However, I haven't yet figured out
|
||||
+ * how to compute that.
|
||||
*/
|
||||
- if (swab32(buf[i].size) == master->erasesize) {
|
||||
+
|
||||
+ unsigned long erasesize_mask = master->erasesize -1;
|
||||
+ unsigned long eraseaddr_mask = 0xFFFFFFFF ^ erasesize_mask;
|
||||
+
|
||||
+ if (((swab32(buf[i].size)+erasesize_mask)
|
||||
+ & eraseaddr_mask) == master->erasesize) {
|
||||
int j;
|
||||
- for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) {
|
||||
+
|
||||
+ /* N.B. The full table being processed so adjust size now */
|
||||
+ numslots = swab32(buf[i].size) / sizeof (struct fis_image_desc);
|
||||
+ for (j = 0; j < numslots; ++j) {
|
||||
/* The unsigned long fields were written with the
|
||||
* wrong byte sex, name and pad have no byte sex.
|
||||
- */
|
||||
- swab32s(&buf[j].flash_base);
|
||||
- swab32s(&buf[j].mem_base);
|
||||
- swab32s(&buf[j].size);
|
||||
- swab32s(&buf[j].entry_point);
|
||||
- swab32s(&buf[j].data_length);
|
||||
- swab32s(&buf[j].desc_cksum);
|
||||
- swab32s(&buf[j].file_cksum);
|
||||
+ *
|
||||
+ * Only process non-deleted entries. Don't exit early.
|
||||
+ */
|
||||
+ if (buf[j].name[0] != 0xff) {
|
||||
+ swab32s(&buf[j].flash_base);
|
||||
+ swab32s(&buf[j].mem_base);
|
||||
+ swab32s(&buf[j].size);
|
||||
+ swab32s(&buf[j].entry_point);
|
||||
+ swab32s(&buf[j].data_length);
|
||||
+ swab32s(&buf[j].desc_cksum);
|
||||
+ swab32s(&buf[j].file_cksum);
|
||||
+ }
|
||||
}
|
||||
+ } else {
|
||||
+ /* Update numslots based on actual FIS directory size */
|
||||
+ numslots = buf[i].size / sizeof (struct fis_image_desc);
|
||||
}
|
||||
break;
|
||||
}
|
@ -0,0 +1,35 @@ |
||||
diff -Nur linux-2.6.17/drivers/net/r8169.c linux-2.6.17-owrt/drivers/net/r8169.c
|
||||
--- linux-2.6.17/drivers/net/r8169.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/drivers/net/r8169.c 2006-10-27 13:18:46.000000000 +0200
|
||||
@@ -483,7 +483,7 @@
|
||||
#endif
|
||||
|
||||
static const u16 rtl8169_intr_mask =
|
||||
- SYSErr | LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
|
||||
+ LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK;
|
||||
static const u16 rtl8169_napi_event =
|
||||
RxOK | RxOverflow | RxFIFOOver | TxOK | TxErr;
|
||||
static const unsigned int rtl8169_rx_config =
|
||||
@@ -1832,8 +1832,8 @@
|
||||
*/
|
||||
RTL_W16(IntrMitigate, 0x0000);
|
||||
|
||||
- RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
|
||||
+ RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
|
||||
RTL_W8(Cfg9346, Cfg9346_Lock);
|
||||
@@ -2535,10 +2535,12 @@
|
||||
if (!(status & rtl8169_intr_mask))
|
||||
break;
|
||||
|
||||
+#if 0
|
||||
if (unlikely(status & SYSErr)) {
|
||||
rtl8169_pcierr_interrupt(dev);
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (status & LinkChg)
|
||||
rtl8169_check_link_status(dev, tp, ioaddr);
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
||||
|
||||
---
|
||||
drivers/net/ixp4xx/ixp4xx_qmgr.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- linux-ixp4xx.orig/drivers/net/ixp4xx/ixp4xx_qmgr.c 2006-10-15 18:52:35.000000000 +0200
|
||||
+++ linux-ixp4xx/drivers/net/ixp4xx/ixp4xx_qmgr.c 2006-10-15 18:54:32.000000000 +0200
|
||||
@@ -107,7 +107,7 @@ static int get_free_qspace(struct qm_qmg
|
||||
return -1;
|
||||
}
|
||||
|
||||
-static inline int log2(int x)
|
||||
+static inline int _log2(int x)
|
||||
{
|
||||
int r=0;
|
||||
while(x>>=1)
|
||||
@@ -127,7 +127,7 @@ static inline int log2(int x)
|
||||
*/
|
||||
static int conf_q_regs(struct qm_queue *queue)
|
||||
{
|
||||
- int bsize = log2(queue->len/16);
|
||||
+ int bsize = _log2(queue->len/16);
|
||||
int baddr = queue->addr + IX_QMGR_QCFG_SIZE;
|
||||
|
||||
/* +2, because baddr is in words and not in bytes */
|
||||
@@ -141,8 +141,8 @@ void queue_set_watermarks(struct qm_queu
|
||||
u32 val;
|
||||
/* calculate the register values
|
||||
* 0->0, 1->1, 2->2, 4->3, 8->4 16->5...*/
|
||||
- ne = log2(ne<<1) & 0x7;
|
||||
- nf = log2(nf<<1) & 0x7;
|
||||
+ ne = _log2(ne<<1) & 0x7;
|
||||
+ nf = _log2(nf<<1) & 0x7;
|
||||
|
||||
/* Mask out old watermarks */
|
||||
val = queue_read_cfg_reg(queue) & ~0xfc000000;
|
Loading…
Reference in new issue