Re: [2.6 patch] drivers/net/ns83820.c: fix a check-after-use

2007-07-02 Thread Jeff Garzik

Adrian Bunk wrote:

This patch fixes a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>


applied


-
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] Update MAINTAINERS for USB network devices

2007-07-02 Thread Jeff Garzik

Peter Korsgaard wrote:

"Greg" == Greg KH <[EMAIL PROTECTED]> writes:


 Greg> Yeah, this is the cdc_acm driver that is still in the USB drivers/
 Greg> directory tree as it is a USB class driver that shows up as a tty device
 Greg> to userspace.  It should not be moved to the networking list unless no
 Greg> one minds that I never see any queries about it :)

Ok, here's an updated patch:

Questions regarding the USB network drivers should now go to netdev.

Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]>
Acked-by: David Brownell <[EMAIL PROTECTED]>


applied


-
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] dm9601: Return 0 from bind() on success

2007-07-02 Thread Jeff Garzik

Peter Korsgaard wrote:

Fixup dm9601_bind() so it returns 0 on success rather than just a positive
number, as otherwise usbnet doesn't init the status handler.

Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]>

---
 drivers/net/usb/dm9601.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)


applied


-
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] dm9601: HW header size shouldn't be included in packet length

2007-07-02 Thread Jeff Garzik

Peter Korsgaard wrote:

The dm9601 driver was including the 2 byte hardware header in the
packet length, causing the HW to send 2 extra bytes of garbage on tx.

Signed-off-by: Peter Korsgaard <[EMAIL PROTECTED]>

---
 drivers/net/usb/dm9601.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


applied


-
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] usbnet: Zero padding byte if there is tail room in skb

2007-07-02 Thread Jeff Garzik

Peter Korsgaard wrote:

Usbnet adds a padding byte if a 0 byte USB packet would be sent. Zero
padding byte if there is tail room in skb.

Signed-of-by: Peter Korsgaard <[EMAIL PROTECTED]>
Acked-by: David Brownell <[EMAIL PROTECTED]>

---
 drivers/net/usb/usbnet.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)


applied


-
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] myri10ge: SET_NETDEV_DEV()

2007-07-02 Thread Jeff Garzik

Maik Hampel wrote:

SET_NETDEV_DEV() in myri10ge to create the "/sys/class/net//device"
symlink.

Signed-off-by: Maik Hampel <[EMAIL PROTECTED]>


applied


-
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] starfire list alpha as 64 bit arch

2007-07-02 Thread Jeff Garzik

maximilian attems wrote:

instead of:
"This driver has not been ported to this 64-bit architecture yet."
the driver is said to work on alpha, see
http://bugs.debian.org/305330

Signed-off-by: maximilian attems <[EMAIL PROTECTED]>


applied


-
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: Handling set_mac_address in set_rx_mode

2007-07-02 Thread Patrick McHardy
Jeff Garzik wrote:
> Patrick McHardy wrote:
> 
>> While adding support for secondary unicast addresses to 8021q and
>> macvlan, I've tried keeping dev->dev_addr as global address on
>> dev->uc_list and have drivers skip them to avoid having all
>> dev_unicast_add users implement a state machine like this:
> 
> 
> [...]
> 
> Something that is not entirely clear to me...  This has zero impact on
> existing drivers, right?


Yes, since the set_rx_mode hook is new anyway this would only
affect drivers offering it (which is none so far). But this
idea turned not to be so good anyways, without the
set_mac_address callback the driver can't validate the new
address.

-
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.6.22 1/4]S2IO: Adding checks to check the return value of pci mapping function

2007-07-02 Thread Jeff Garzik

Veena Parat wrote:
Adding checks to check the return value of pci mapping function 


Signed-off-by: Veena Parat <[EMAIL PROTECTED]>
---
diff -urpN org/drivers/net/s2io.c patch_1/drivers/net/s2io.c
--- org/drivers/net/s2io.c  2007-05-17 20:35:39.0 +0530
+++ patch_1/drivers/net/s2io.c  2007-05-17 20:35:55.0 +0530
@@ -282,6 +282,7 @@ static char ethtool_driver_stats_keys[][
("lro_flush_due_to_max_pkts"),
("lro_avg_aggr_pkts"),
("mem_alloc_fail_cnt"),
+   {"pci_map_fail_cnt"},
("watchdog_timer_cnt"),
("mem_allocated"),
("mem_freed"),
@@ -2247,10 +2248,19 @@ static int fill_rxd_3buf(struct s2io_nic
(nic->pdev, skb->data, l3l4hdr_size + 4,
PCI_DMA_FROMDEVICE);
 
+	if struct RxD3*)rxdp)->Buffer1_ptr == 0) ||

+   (((struct RxD3*)rxdp)->Buffer1_ptr == DMA_ERROR_CODE)) {
+   nic->mac_control.stats_info->sw_stat.pci_map_fail_cnt++;
+   return -ENOMEM;
+   }
+
/* skb_shinfo(skb)->frag_list will have L4 data payload */
skb_shinfo(skb)->frag_list = dev_alloc_skb(dev->mtu + ALIGN_SIZE);
if (skb_shinfo(skb)->frag_list == NULL) {
nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++;
+   pci_unmap_single
+   (nic->pdev, (dma_addr_t)skb->data, l3l4hdr_size + 4,
+   PCI_DMA_FROMDEVICE);
DBG_PRINT(INFO_DBG, "%s: dev_alloc_skb failed\n ", dev->name);
return -ENOMEM ;
}
@@ -2267,6 +2277,11 @@ static int fill_rxd_3buf(struct s2io_nic
((struct RxD3*)rxdp)->Buffer2_ptr = pci_map_single(nic->pdev,
frag_list->data, dev->mtu,
PCI_DMA_FROMDEVICE);
+   if struct RxD3*)rxdp)->Buffer2_ptr == 0) ||
+   (((struct RxD3*)rxdp)->Buffer2_ptr == DMA_ERROR_CODE)) {
+   nic->mac_control.stats_info->sw_stat.pci_map_fail_cnt++;
+   return -ENOMEM;
+   }
rxdp->Control_2 |= SET_BUFFER1_SIZE_3(l3l4hdr_size + 4);
rxdp->Control_2 |= SET_BUFFER2_SIZE_3(dev->mtu);
 
@@ -2399,6 +2414,16 @@ static int fill_rx_buffers(struct s2io_n

((struct RxD1*)rxdp)->Buffer0_ptr = pci_map_single
(nic->pdev, skb->data, size - NET_IP_ALIGN,
PCI_DMA_FROMDEVICE);
+   if struct RxD1*)rxdp)->Buffer0_ptr == 0) ||
+(((struct RxD1*)rxdp)->Buffer0_ptr == 
+DMA_ERROR_CODE)) {

+   nic->mac_control.stats_info->sw_stat.
+   pci_map_fail_cnt++;
+   nic->mac_control.stats_info->sw_stat.mem_freed
+   += skb->truesize;
+   dev_kfree_skb_irq(skb);
+   return -ENOMEM;
+   }
 			rxdp->Control_2 = 
 SET_BUFFER0_SIZE_1(size - NET_IP_ALIGN);
 


please provide a prep patch that eliminates all these inline casts. 
Create temporary variables or whatever you need to do to convert the 
messy and unreadable "(((struct RxD1*)rxdp)->Buffer0_ptr" into 
"desc->Buffer0_ptr".


otherwise looks OK

-
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.6.22 3/4]S2IO: Removing 3 buffer mode support from the driver

2007-07-02 Thread Jeff Garzik

Veena Parat wrote:

Removed 3 buffer mode support from driver - unused feature

Signed-off-by: Veena Parat <[EMAIL PROTECTED]>


ACK, but dropped due to patch #2 being dropped


-
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.6.22 4/4]S2IO: Implementing review comments from old patches

2007-07-02 Thread Jeff Garzik

Veena Parat wrote:
Implementation of review comments 
1. Incorporated Jeff Garzik's comments on coding standards.

2. Incorporated Andreas Schwab's comments on redundant condition check.

Signed-off-by: Veena Parat <[EMAIL PROTECTED]>


ACK but dropped due to patch #2 being dropped


-
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.6.22 2/4]S2IO: Removing MSI support from the driver

2007-07-02 Thread Jeff Garzik

Veena Parat wrote:

1.Removed MSI support from driver - unused feature
2.Removed pci_request_regions call to allocate bar2 as it is not used in driver
3.Removed pci_release_regions since pci_request_regions is not done


This is wrong.  pci_request_regions() grabs all the regions for the 
associated PCI device, which is the desired behavior.


Using request_mem_region() is not what you want to do for PCI devices.


-
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: Please pull 'libertas-fixes' branch of wireless-2.6

2007-07-02 Thread Jeff Garzik

John W. Linville wrote:

The following changes since commit 189548642c5962e60c3667bdb3a703fe0bed12a6:
  Linus Torvalds (1):
Linus 2.6.22-rc6

are found in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git 
libertas-fixes

Dan Williams (4):
  libertas: style fixes
  libertas: kill wlan_scan_process_results
  libertas: fix WPA associations by handling ENABLE_RSN correctly
  libertas: remove private ioctls

 drivers/net/wireless/libertas/Makefile  |2 +-
 drivers/net/wireless/libertas/README|  275 
 drivers/net/wireless/libertas/assoc.c   |   28 +-
 drivers/net/wireless/libertas/cmd.c |   12 +-
 drivers/net/wireless/libertas/cmdresp.c |   21 +
 drivers/net/wireless/libertas/hostcmd.h |2 +-
 drivers/net/wireless/libertas/ioctl.c   | 1081 ---
 drivers/net/wireless/libertas/main.c|8 +-
 drivers/net/wireless/libertas/scan.c|   51 +--
 drivers/net/wireless/libertas/wext.c|  152 -
 drivers/net/wireless/libertas/wext.h|   45 +--
 11 files changed, 79 insertions(+), 1598 deletions(-)
 delete mode 100644 drivers/net/wireless/libertas/ioctl.c


pulled


-
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: Please pull from 'from_linus' branch

2007-07-02 Thread Jeff Garzik

Kumar Gala wrote:

Please pull from 'for_linus' branch of

master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for_linus

to receive the following updates:

 drivers/net/gianfar.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Kumar Gala (1):
  gianfar: Fix typo bug introduced by move to udp_hdr()


pulled


-
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/RESENT] ehea: Whitespace cleanup

2007-07-02 Thread Jan-Bernd Themann
This patch fixes several whitespace issues.

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


diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index c0f81b5..abaf3ac 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@
 #include 
 
 #define DRV_NAME   "ehea"
-#define DRV_VERSION"EHEA_0064"
+#define DRV_VERSION"EHEA_0065"
 
 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
@@ -136,10 +136,10 @@ void ehea_dump(void *adr, int len, char *msg);
(0xULL >> ((64 - (mask)) & 0x))
 
 #define EHEA_BMASK_SET(mask, value) \
-((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))
+   ((EHEA_BMASK_MASK(mask) & ((u64)(value))) << EHEA_BMASK_SHIFTPOS(mask))
 
 #define EHEA_BMASK_GET(mask, value) \
-(EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))
+   (EHEA_BMASK_MASK(mask) & (((u64)(value)) >> EHEA_BMASK_SHIFTPOS(mask)))
 
 /*
  * Generic ehea page
@@ -190,7 +190,7 @@ struct ehea_av;
  * Queue attributes passed to ehea_create_qp()
  */
 struct ehea_qp_init_attr {
-/* input parameter */
+   /* input parameter */
u32 qp_token;   /* queue token */
u8 low_lat_rq1;
u8 signalingtype;   /* cqe generation flag */
@@ -212,7 +212,7 @@ struct ehea_qp_init_attr {
u64 recv_cq_handle;
u64 aff_eq_handle;
 
-/* output parameter */
+   /* output parameter */
u32 qp_nr;
u16 act_nr_send_wqes;
u16 act_nr_rwqes_rq1;
@@ -279,12 +279,12 @@ struct ehea_qp {
  * Completion Queue attributes
  */
 struct ehea_cq_attr {
-/* input parameter */
+   /* input parameter */
u32 max_nr_of_cqes;
u32 cq_token;
u64 eq_handle;
 
-/* output parameter */
+   /* output parameter */
u32 act_nr_of_cqes;
u32 nr_pages;
 };
diff --git a/drivers/net/ehea/ehea_hw.h b/drivers/net/ehea/ehea_hw.h
index 1246757..1af7ca4 100644
--- a/drivers/net/ehea/ehea_hw.h
+++ b/drivers/net/ehea/ehea_hw.h
@@ -211,34 +211,34 @@ static inline void epa_store_acc(struct h_epa epa, u32 
offset, u64 value)
 }
 
 #define epa_store_eq(epa, offset, value)\
-epa_store(epa, EQTEMM_OFFSET(offset), value)
+   epa_store(epa, EQTEMM_OFFSET(offset), value)
 #define epa_load_eq(epa, offset)\
-epa_load(epa, EQTEMM_OFFSET(offset))
+   epa_load(epa, EQTEMM_OFFSET(offset))
 
 #define epa_store_cq(epa, offset, value)\
-epa_store(epa, CQTEMM_OFFSET(offset), value)
+   epa_store(epa, CQTEMM_OFFSET(offset), value)
 #define epa_load_cq(epa, offset)\
-epa_load(epa, CQTEMM_OFFSET(offset))
+   epa_load(epa, CQTEMM_OFFSET(offset))
 
 #define epa_store_qp(epa, offset, value)\
-epa_store(epa, QPTEMM_OFFSET(offset), value)
+   epa_store(epa, QPTEMM_OFFSET(offset), value)
 #define epa_load_qp(epa, offset)\
-epa_load(epa, QPTEMM_OFFSET(offset))
+   epa_load(epa, QPTEMM_OFFSET(offset))
 
 #define epa_store_qped(epa, offset, value)\
-epa_store(epa, QPEDMM_OFFSET(offset), value)
+   epa_store(epa, QPEDMM_OFFSET(offset), value)
 #define epa_load_qped(epa, offset)\
-epa_load(epa, QPEDMM_OFFSET(offset))
+   epa_load(epa, QPEDMM_OFFSET(offset))
 
 #define epa_store_mrmw(epa, offset, value)\
-epa_store(epa, MRMWMM_OFFSET(offset), value)
+   epa_store(epa, MRMWMM_OFFSET(offset), value)
 #define epa_load_mrmw(epa, offset)\
-epa_load(epa, MRMWMM_OFFSET(offset))
+   epa_load(epa, MRMWMM_OFFSET(offset))
 
 #define epa_store_base(epa, offset, value)\
-epa_store(epa, HCAGR_OFFSET(offset), value)
+   epa_store(epa, HCAGR_OFFSET(offset), value)
 #define epa_load_base(epa, offset)\
-epa_load(epa, HCAGR_OFFSET(offset))
+   epa_load(epa, HCAGR_OFFSET(offset))
 
 static inline void ehea_update_sqa(struct ehea_qp *qp, u16 nr_wqes)
 {
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 9e13433..bdb5241 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -81,7 +81,7 @@ MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive 
queues, Default = 1 ");
 static int port_name_cnt = 0;
 
 static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,
-const struct of_device_id *id);
+   const struct of_device_id *id);
 
 static int __devexit ehea_remove(struct ibmebus_dev *dev);
 
@@ -236,7 +236,7 @@ static int ehea_refill_rq_def(struct ehea_port_res *pr,
 
rwqe = ehea_get_next_rwqe(qp, rq_nr);
rwqe->wr_id = EHEA_BMASK_SET(EHEA_WR_ID_TYPE, wqe_type)
-   | EHEA_BMASK_SET(EHEA_WR_ID_INDEX, index);
+   | EHEA_BMASK_SET(EHEA_WR_ID_INDEX, index);
rwqe->sg_list[0].l_key = pr->recv_mr.lkey;
rwqe->sg_list

Re: r8169 2.2LK: Low link speed after suspend

2007-07-02 Thread Jens Stroebel
Jens Stroebel wrote:
> Francois Romieu wrote:
>> Francois Romieu <[EMAIL PROTECTED]> :
>> [...]
>>> The patch will not apply directly against 2.6.21.5. Is it an option for
>>> you to try 2.6.22-rc6 or are you stuck with 2.6.21.5 ?
>> If you feel adventurous, you will find a compile-tested-only patchkit for
>> 2.6.21.5 here:
>> http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21.5
>> or:
>> http://www.fr.zoreil.com/people/francois/misc/20060630-2.6.21.5-r8169-test.patch
>>
>> The content should be almost the same as the 2.6.22-rc6 patchkit dated
>> from 2007/06/28 (i.e. pending 2.6.23 merge).

> Wow, great; I applied it to the kernel build this morning;
> in itself, it does not stop the blocking behavior from happening.
> But I will try to add the patch I mentioned in the previous messages of
> which you said it shouldn't be used without applying the patchset first.

Still the same hard-lockup behavior (with the patch mentioned before,
which is not part of your patchset but remedies the blocking) as without
your patchkit applied first.

greets,
   drifter
-- 
[EMAIL PROTECTED]
23.56...drifting
By caffeine alone I set my mind in motion, By the beans of Java
do thoughts acquire speed,  hands acquire shaking,  the shaking
becomes a warning, By caffeine alone do I set my mind in motion
-
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: [NETPOLL] netconsole: fix soft lockup when removing module

2007-07-02 Thread Jarek Poplawski
On Mon, Jul 02, 2007 at 01:24:08PM +0400, Oleg Nesterov wrote:
> On 07/02, Jarek Poplawski wrote:
> >
> > > > --- a/net/core/netpoll.c
> > > > +++ b/net/core/netpoll.c
> > > > @@ -72,7 +72,8 @@ static void queue_process(struct work_struct *work)
> > > > netif_tx_unlock(dev);
> > > > local_irq_restore(flags);
> > > >  
> > > > -   schedule_delayed_work(&npinfo->tx_work, HZ/10);
> > > > +   if (atomic_read(&npinfo->refcnt))
> > > > +   schedule_delayed_work(&npinfo->tx_work, 
> > > > HZ/10);
> > > > return;
> > > > }
> >
> > [...snip...]
> > 
> > So, 2.6.21 needs something better (maybe you've found it btw.?),
> > but they weren't too interested, anyway.
> 
> We can do a double flush trick. If queue_process() checks ->refcnt before
> schedule_delayed_work() like above, netpoll_cleanup() can do
> 
>   flush_scheduled_work();
> 
>   // the next invocation of queue_process()
>   // must see ->refcnt == 0
>   if (!cancel_delayed_work(&npinfo->tx_work)) {
>   /* may be queued, wait for completion */
>   flush_scheduled_work();
>   }

I'll try to think about it later, but I don't plan to do next patch,
so feel free to send this. I didn't plan to fix netpoll at all
(I never didn't use nor studied this before...). But couldn't stand
this stupid lockup stays in 2.6.21. Now, I see it probably doesn't
annoy more than 2 or 3 people around...

> 
> Jarek, I don't understand net/, a silly question. Why do we need the #2 chunk?
> Isn't it better to move skb_queue_purge(&npinfo->txq) after cancel_..._work()
> instead?

I've thought about this too, but because I don't know netpoll/netconsole
enough I didn't want to change more than minimum needed. 

skb_queue_purge() uses heavy locking (irqsave) and I don't remember now
if I've found the reason or simply believed somebody had to have a reason
to do this there, anyway, if moved after cancel_ it could be done without
this locking, and something like while () instead of my if () should be
enough.

But there was not much interest about this patch, and I'm not currently
interested to be the main netconsole expert too, so maybe you would
like to try...

Cheers,
Jarek P.
-
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: r8169 2.2LK: Low link speed after suspend

2007-07-02 Thread Jens Stroebel
Francois Romieu wrote:
> Francois Romieu <[EMAIL PROTECTED]> :
> [...]
>> The patch will not apply directly against 2.6.21.5. Is it an option for
>> you to try 2.6.22-rc6 or are you stuck with 2.6.21.5 ?
> 
> If you feel adventurous, you will find a compile-tested-only patchkit for
> 2.6.21.5 here:
> http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.21.5
> or:
> http://www.fr.zoreil.com/people/francois/misc/20060630-2.6.21.5-r8169-test.patch
> 
> The content should be almost the same as the 2.6.22-rc6 patchkit dated
> from 2007/06/28 (i.e. pending 2.6.23 merge).

  Wow, great; I applied it to the kernel build this morning;
in itself, it does not stop the blocking behavior from happening.
But I will try to add the patch I mentioned in the previous messages of
which you said it shouldn't be used without applying the patchset first.

greets,
   jens
-- 
[EMAIL PROTECTED]
23.56...drifting
By caffeine alone I set my mind in motion, By the beans of Java
do thoughts acquire speed,  hands acquire shaking,  the shaking
becomes a warning, By caffeine alone do I set my mind in motion
-
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: sky2 hangs without any messages

2007-07-02 Thread Daniel J Blueman

Hi Stephen,

Tino Keitel <[EMAIL PROTECTED]> wrote:

in the last 2 days, I had 2 outages of the NIC of my Mac mini Core Duo.
I checked the kernel log but I found nothing sky2 related. After
reloading the module, the interface worked again.



There is a reproducible hang (due to missed IRQ) in sky2.  It is more 
reproducible
with slower CPU's like Mac Mini.


This feels like the same problem I hit once every ~2 days on my server
platform or laptop [1]: both Yukon-ECs, rev 1 and 2, running NFSv4
over TCP over a gig-e switch, ia32, PCI-E.

Observations:

1. problem happens with both rev-1 and 2 Yukon-ECs, so less likely a silicon bug
2. reproducible with 1500 MTU on both ends
3. reproducible with and without receive offloading disabled (ie
'ethtool -K gig0 rx off') [check with tx offload too?]
4. reproducible with two different gig-e switches and different cables
5. reproducible with MSI interrupts [check with legacy interrupts?]

Is there anything that I can do to help debug this missing IRQ hang?
I'm thinking of moving to the vendor driver [2] to see if the issue is
entirely avoidable in software.

Thanks,
 Daniel

--- [1]

sky2 :02:00.0: v1.14 addr 0xd600 irq 16 Yukon-EC (0xb6) rev 2
sky2 gig0: addr 00:16:b6:70:d8:3d
sky2 gig0: enabling interface
sky2 gig0: ram buffer 48K
sky2 gig0: Link is up at 1000 Mbps, full duplex, flow control both

NETDEV WATCHDOG: gig0: transmit timed out
sky2 gig0: tx timeout
sky2 gig0: transmit ring 424 .. 401 report=427 done=427
sky2 gig0: disabling interface
sky2 gig0: enabling interface
sky2 gig0: ram buffer 48K
sky2 gig0: Link is up at 1000 Mbps, full duplex, flow control both


$ grep gig0 /proc/interrupts
218:  27297  0   PCI-MSI-edge  gig0

--- [2]

http://www.syskonnect.de/e_en/products/adapters/pcie_server/sk-9exx/software/linux/driver/install-8_31.tar.bz2
--
Daniel J Blueman
-
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/2][NETPOLL] netconsole: delete flush_scheduled_work

2007-07-02 Thread Jarek Poplawski
On Mon, Jul 02, 2007 at 12:59:49PM +0400, Oleg Nesterov wrote:
...
> While you are here, could you also delete this flush_scheduled_work() ?
> It is not needed any longer.

Yes. I've thought about this, and even planned to mention, but then
forgotten... Of course, you are right, but since it stayed so long
and doesn't seem to be dangerous, and there is -rc7 I wasn't so brave.
But now I have an explanation...

Jarek P.

-->

Subject: [PATCH][NETPOLL] netconsole: delete flush_scheduled_work

flush_scheduled_work() isn't needed after cancel_rearming_delayed_work(),
so here it's removed from netpoll_cleanup().

PS: This patch was prepared on 2.6.22-rc7 with my other today's patch:
netconsole: fix soft lockup ...

Noticed-by: Oleg Nesterov <[EMAIL PROTECTED]>

Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>

---

diff -Nurp 2.6.22-rc7-plus-revert1-/net/core/netpoll.c 
2.6.22-rc7-plus-revert1/net/core/netpoll.c
--- 2.6.22-rc7-plus-revert1-/net/core/netpoll.c 2007-07-02 09:32:34.0 
+0200
+++ 2.6.22-rc7-plus-revert1/net/core/netpoll.c  2007-07-02 11:43:29.0 
+0200
@@ -786,7 +786,6 @@ void netpoll_cleanup(struct netpoll *np)
skb_queue_purge(&npinfo->arp_tx);
skb_queue_purge(&npinfo->txq);
cancel_rearming_delayed_work(&npinfo->tx_work);
-   flush_scheduled_work();
 
/* clean after last, unfinished work */
if (!skb_queue_empty(&npinfo->txq)) {
-
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: [NETPOLL] netconsole: fix soft lockup when removing module

2007-07-02 Thread Oleg Nesterov
On 07/02, Jarek Poplawski wrote:
>
> > > --- a/net/core/netpoll.c
> > > +++ b/net/core/netpoll.c
> > > @@ -72,7 +72,8 @@ static void queue_process(struct work_struct *work)
> > >   netif_tx_unlock(dev);
> > >   local_irq_restore(flags);
> > >  
> > > - schedule_delayed_work(&npinfo->tx_work, HZ/10);
> > > + if (atomic_read(&npinfo->refcnt))
> > > + schedule_delayed_work(&npinfo->tx_work, HZ/10);
> > >   return;
> > >   }
>
> [...snip...]
> 
> So, 2.6.21 needs something better (maybe you've found it btw.?),
> but they weren't too interested, anyway.

We can do a double flush trick. If queue_process() checks ->refcnt before
schedule_delayed_work() like above, netpoll_cleanup() can do

flush_scheduled_work();

// the next invocation of queue_process()
// must see ->refcnt == 0
if (!cancel_delayed_work(&npinfo->tx_work)) {
/* may be queued, wait for completion */
flush_scheduled_work();
}

Jarek, I don't understand net/, a silly question. Why do we need the #2 chunk?
Isn't it better to move skb_queue_purge(&npinfo->txq) after cancel_..._work()
instead?

Oleg.   

-
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] Re: [NETPOLL] netconsole: fix soft lockup when removing module

2007-07-02 Thread Oleg Nesterov
On 07/02, Jarek Poplawski wrote:
> 
> diff -Nurp 2.6.22-rc7-/net/core/netpoll.c 2.6.22-rc7/net/core/netpoll.c
> --- 2.6.22-rc7-/net/core/netpoll.c2007-07-02 09:03:27.0 +0200
> +++ 2.6.22-rc7/net/core/netpoll.c 2007-07-02 09:32:34.0 +0200
> @@ -72,8 +72,7 @@ static void queue_process(struct work_st
>   netif_tx_unlock(dev);
>   local_irq_restore(flags);
>  
> - if (atomic_read(&npinfo->refcnt))
> - schedule_delayed_work(&npinfo->tx_work, HZ/10);
> + schedule_delayed_work(&npinfo->tx_work, HZ/10);
>   return;
>   }
>   netif_tx_unlock(dev);
> @@ -786,7 +785,7 @@ void netpoll_cleanup(struct netpoll *np)
>   if (atomic_dec_and_test(&npinfo->refcnt)) {
>   skb_queue_purge(&npinfo->arp_tx);
>   skb_queue_purge(&npinfo->txq);
> - cancel_delayed_work(&npinfo->tx_work);
> + cancel_rearming_delayed_work(&npinfo->tx_work);
>   flush_scheduled_work();

While you are here, could you also delete this flush_scheduled_work() ?
It is not needed any longer.

Oleg.

-
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: Fwd: [PATCH] [-mm] ACPI: export ACPI events via netlink

2007-07-02 Thread Johannes Berg
On Sat, 2007-06-30 at 11:32 -0400, jamal wrote:

> > +static void genl_unregister_mc_group(struct genl_multicast_group *grp)
> > +{
> > +   /*
> > +* TODO: fix multicast group re-use by clearing the bit
> > +*   for this group in all genetlink sockets.
> > +*/
> > +   clear_bit(grp->id, mc_groups);
> > +   list_del(&grp->list);
> 
> I think you need a 
> genl_ctrl_event(CTRL_CMD_DELMCAST_GRP, family);
> here? You may need to save the mcast details before you delete.

I will, but not currently because right now mcast groups are only
deleted when the family is dropped.

> > +   NLA_PUT_U32(skb, CTRL_ATTR_MCAST_GRP_ID, grp->id);
> > +   NLA_PUT_STRING(skb, CTRL_ATTR_MCAST_GRP_NAME,
> > +  grp->name);
> > +
> 
> Consider my earlier suggestion to use CTRL_ATTR_MCAST_GRP which has both
> id and name in one struct.

Yeah I thought about that but then saw Patrick's patches to convert
other things away from structs so I wasn't sure what the idea here is.
Patrick, care to comment?

> Other than that - looking good.

:)

johannes


signature.asc
Description: This is a digitally signed message part


Re: quirk_e100_interrupt() called too early

2007-07-02 Thread Nils Rennebarth

Bjorn Helgaas wrote:

On Thursday 28 June 2007 10:01:08 am Kok, Auke wrote:
I copied Nils Rennebarth, who originally reported the bug:
  http://bugzilla.kernel.org/show_bug.cgi?id=5918
in case he can test your patch.
Most of the embedded boards we now work with appear to exhibit the same 
behaviour: During boot the


Firmware left :01:05.0 e100 interrupts enabled, disabling

message appears for all four e100 nics. (The mainboard is a em-8510A 
btw.) When I have time I could try if the quirk still works with the

mentioned patch, but I am quite busy with other things at the moment.

--

Mit freundlichen Grüßen / with kind regards

Nils Rennebarth, Software Developer

--
Funkwerk IP-Appliances GmbH
Mönchhaldenstraße 28
D-70191 Stuttgart

Tel: +49 711 900300 - 0
Fax: +49 711 900300 - 90

E-Mail: [EMAIL PROTECTED]

Location: GmbH Neu-Ulm, Local Court Memmingen, HRB 13043
Managing Directors: Michael Marsanu, Soenke Weisner


The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.
-
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] Re: [NETPOLL] netconsole: fix soft lockup when removing module

2007-07-02 Thread Jarek Poplawski

>From my recent patch:

> >#1
> >Until kernel ver. 2.6.21 (including) cancel_rearming_delayed_work()
> >required a work function should always (unconditionally) rearm with
> >delay > 0 - otherwise it would endlessly loop. This patch replaces
> >this function with cancel_delayed_work(). Later kernel versions don't
> >require this, so here it's only for uniformity.

But Oleg Nesterov <[EMAIL PROTECTED]> found:

> But 2.6.22 doesn't need this change, why it was merged?
> 
> In fact, I suspect this change adds a race,
...

His description was right (thanks), so this patch reverts #1.

Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]>

---

diff -Nurp 2.6.22-rc7-/net/core/netpoll.c 2.6.22-rc7/net/core/netpoll.c
--- 2.6.22-rc7-/net/core/netpoll.c  2007-07-02 09:03:27.0 +0200
+++ 2.6.22-rc7/net/core/netpoll.c   2007-07-02 09:32:34.0 +0200
@@ -72,8 +72,7 @@ static void queue_process(struct work_st
netif_tx_unlock(dev);
local_irq_restore(flags);
 
-   if (atomic_read(&npinfo->refcnt))
-   schedule_delayed_work(&npinfo->tx_work, HZ/10);
+   schedule_delayed_work(&npinfo->tx_work, HZ/10);
return;
}
netif_tx_unlock(dev);
@@ -786,7 +785,7 @@ void netpoll_cleanup(struct netpoll *np)
if (atomic_dec_and_test(&npinfo->refcnt)) {
skb_queue_purge(&npinfo->arp_tx);
skb_queue_purge(&npinfo->txq);
-   cancel_delayed_work(&npinfo->tx_work);
+   cancel_rearming_delayed_work(&npinfo->tx_work);
flush_scheduled_work();
 
/* clean after last, unfinished work */
-
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


<    1   2