Re: [PATCH] Re: Q: natsemi.c spinlocks

2001-01-22 Thread Manfred Spraul
Donald Becker wrote: > > > > However, natsemi.c's spinlock needs to be retained, and > > > extended into start_tx(), because this driver has > > > a race which has cropped up in a few others: > > > ... > > > if (np->cur_tx - np->dirty_tx >= TX_QUEUE_LEN - 1) { > > > /*

Re: [PATCH] Re: Q: natsemi.c spinlocks

2001-01-22 Thread Manfred Spraul
Donald Becker wrote: However, natsemi.c's spinlock needs to be retained, and extended into start_tx(), because this driver has a race which has cropped up in a few others: ... if (np-cur_tx - np-dirty_tx = TX_QUEUE_LEN - 1) { /* WINDOW HERE */

Re: [PATCH] Re: Q: natsemi.c spinlocks

2001-01-21 Thread Donald Becker
On Sun, 21 Jan 2001, Jeff Garzik wrote: > Andrew Morton wrote: > > Manfred wrote: > > > Hi Jeff, Tjeerd, > > > I spotted the spin_lock in natsemi.c, and I think it's bogus. > > > > > > The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel > > > (even Alan didn't remember it

[PATCH] Re: Q: natsemi.c spinlocks

2001-01-21 Thread Jeff Garzik
Andrew Morton wrote: > > Manfred wrote: > > > > Hi Jeff, Tjeerd, > > > > I spotted the spin_lock in natsemi.c, and I think it's bogus. > > > > The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel > > (even Alan didn't remember it exactly when I asked him), thus a sane > >

Re: Q: natsemi.c spinlocks

2001-01-21 Thread Jeff Garzik
Manfred wrote: > > Andrew Morton wrote: > > > > start_tx() > > { > > Yes, I overlooked start_tx. > > Hmm. start_tx also assumes that the cpu commits writes in order, I'm > sure the driver is unreliable on RISC cpus. > > Perhaps the driver should use pci_alloc_consistent and pci_map_single?

Re: Q: natsemi.c spinlocks

2001-01-21 Thread Jeff Garzik
Manfred wrote: Andrew Morton wrote: start_tx() { Yes, I overlooked start_tx. Hmm. start_tx also assumes that the cpu commits writes in order, I'm sure the driver is unreliable on RISC cpus. Perhaps the driver should use pci_alloc_consistent and pci_map_single? Eventually, all

[PATCH] Re: Q: natsemi.c spinlocks

2001-01-21 Thread Jeff Garzik
Andrew Morton wrote: Manfred wrote: Hi Jeff, Tjeerd, I spotted the spin_lock in natsemi.c, and I think it's bogus. The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel (even Alan didn't remember it exactly when I asked him), thus a sane driver can assume that

Re: [PATCH] Re: Q: natsemi.c spinlocks

2001-01-21 Thread Donald Becker
On Sun, 21 Jan 2001, Jeff Garzik wrote: Andrew Morton wrote: Manfred wrote: Hi Jeff, Tjeerd, I spotted the spin_lock in natsemi.c, and I think it's bogus. The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel (even Alan didn't remember it exactly when I asked

Re: Q: natsemi.c spinlocks

2000-12-24 Thread Manfred
Andrew Morton wrote: > > start_tx() > { Yes, I overlooked start_tx. Hmm. start_tx also assumes that the cpu commits writes in order, I'm sure the driver is unreliable on RISC cpus. Perhaps the driver should use pci_alloc_consistent and pci_map_single? -- Manfred - To unsubscribe from this

Re: Q: natsemi.c spinlocks

2000-12-24 Thread Manfred
Andrew Morton wrote: start_tx() { Yes, I overlooked start_tx. Hmm. start_tx also assumes that the cpu commits writes in order, I'm sure the driver is unreliable on RISC cpus. Perhaps the driver should use pci_alloc_consistent and pci_map_single? -- Manfred - To unsubscribe from this

Re: Q: natsemi.c spinlocks

2000-12-23 Thread Andrew Morton
Manfred wrote: > > Hi Jeff, Tjeerd, > > I spotted the spin_lock in natsemi.c, and I think it's bogus. > > The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel > (even Alan didn't remember it exactly when I asked him), thus a sane > driver can assume that an interrupt handler

Q: natsemi.c spinlocks

2000-12-23 Thread Manfred
Hi Jeff, Tjeerd, I spotted the spin_lock in natsemi.c, and I think it's bogus. The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel (even Alan didn't remember it exactly when I asked him), thus a sane driver can assume that an interrupt handler is never reentered. Donald

Q: natsemi.c spinlocks

2000-12-23 Thread Manfred
Hi Jeff, Tjeerd, I spotted the spin_lock in natsemi.c, and I think it's bogus. The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel (even Alan didn't remember it exactly when I asked him), thus a sane driver can assume that an interrupt handler is never reentered. Donald

Re: Q: natsemi.c spinlocks

2000-12-23 Thread Andrew Morton
Manfred wrote: Hi Jeff, Tjeerd, I spotted the spin_lock in natsemi.c, and I think it's bogus. The "simultaneous interrupt entry" is a bug in some 2.0 and 2.1 kernel (even Alan didn't remember it exactly when I asked him), thus a sane driver can assume that an interrupt handler is never