Revert "be2net: remove desc field from be_eq_obj"
authorIvan Vecera <ivecera@redhat.com>
Tue, 23 Oct 2018 14:40:26 +0000 (16:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2018 18:01:53 +0000 (11:01 -0700)
The mentioned commit needs to be reverted because we cannot pass
string allocated on stack to request_irq(). This function stores
uses this pointer for later use (e.g. /proc/interrupts) so we need
to keep this string persistently.

Fixes: d6d9704af8f4 ("be2net: remove desc field from be_eq_obj")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_main.c

index 58bcee8f0a58b700593d44bc3638e2ed9a2ebfb2..ce041c90adb02855849ba0d4fd974a24da8113f1 100644 (file)
@@ -185,6 +185,7 @@ static inline void queue_tail_inc(struct be_queue_info *q)
 
 struct be_eq_obj {
        struct be_queue_info q;
 
 struct be_eq_obj {
        struct be_queue_info q;
+       char desc[32];
 
        struct be_adapter *adapter;
        struct napi_struct napi;
 
        struct be_adapter *adapter;
        struct napi_struct napi;
index 534787291b44f17a6d47c480e35ee7da5e2e6319..bff74752cef16f4fd55b1702660ca048a236162c 100644 (file)
@@ -3488,11 +3488,9 @@ static int be_msix_register(struct be_adapter *adapter)
        int status, i, vec;
 
        for_all_evt_queues(adapter, eqo, i) {
        int status, i, vec;
 
        for_all_evt_queues(adapter, eqo, i) {
-               char irq_name[IFNAMSIZ+4];
-
-               snprintf(irq_name, sizeof(irq_name), "%s-q%d", netdev->name, i);
+               sprintf(eqo->desc, "%s-q%d", netdev->name, i);
                vec = be_msix_vec_get(adapter, eqo);
                vec = be_msix_vec_get(adapter, eqo);
-               status = request_irq(vec, be_msix, 0, irq_name, eqo);
+               status = request_irq(vec, be_msix, 0, eqo->desc, eqo);
                if (status)
                        goto err_msix;
 
                if (status)
                        goto err_msix;