History

RDMA/hns: Fix a bug with modifying mac address

When modifying mac address, it will trigger hns_roce_del_gid function and can't delete the default gid matched the index because the attribute of gid is null.

oulijun committed 8 years ago

Commit 173bc6b1 parent fc968ae1 file · +2 −1Browse files

Unified · Split

drivers/infiniband/hw/hns/hns_roce_main.c+2−1
@@ -100,6 +100,7 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num, · 99 unmodified lines
100 unsigned int index, void **context)100 unsigned int index, void **context)
101{101{
102 struct hns_roce_dev *hr_dev = to_hr_dev(device);102 struct hns_roce_dev *hr_dev = to_hr_dev(device);
103 struct ib_gid_attr zattr = { };
103 union ib_gid zgid = { {0} };104 union ib_gid zgid = { {0} };
104 u8 port = port_num - 1;105 u8 port = port_num - 1;
105 unsigned long flags;106 unsigned long flags;
@@ -110,7 +111,7 @@ static int hns_roce_del_gid(struct ib_device *device, u8 port_num, · 4 unmodified lines
110 111
111 spin_lock_irqsave(&hr_dev->iboe.lock, flags);112 spin_lock_irqsave(&hr_dev->iboe.lock, flags);
112 113
113 ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, NULL);114 ret = hr_dev->hw->set_gid(hr_dev, port, index, &zgid, &zattr);
114 115
115 spin_unlock_irqrestore(&hr_dev->iboe.lock, flags);116 spin_unlock_irqrestore(&hr_dev->iboe.lock, flags);
116 117

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t