aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/fcoe/libfcoe.c21
-rw-r--r--include/scsi/libfcoe.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 0d6f5beb7f9e..3865d936dee8 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -97,7 +97,7 @@ static struct notifier_block fcoe_cpu_notifier = {
97 * 97 *
98 * Returns: none 98 * Returns: none
99 */ 99 */
100static void fcoe_create_percpu_data(int cpu) 100static void fcoe_create_percpu_data(unsigned int cpu)
101{ 101{
102 struct fc_lport *lp; 102 struct fc_lport *lp;
103 struct fcoe_softc *fc; 103 struct fcoe_softc *fc;
@@ -121,7 +121,7 @@ static void fcoe_create_percpu_data(int cpu)
121 * 121 *
122 * Retuns: none 122 * Retuns: none
123 */ 123 */
124static void fcoe_destroy_percpu_data(int cpu) 124static void fcoe_destroy_percpu_data(unsigned int cpu)
125{ 125{
126 struct fc_lport *lp; 126 struct fc_lport *lp;
127 struct fcoe_softc *fc; 127 struct fcoe_softc *fc;
@@ -183,9 +183,9 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *dev,
183 struct fcoe_softc *fc; 183 struct fcoe_softc *fc;
184 struct fcoe_dev_stats *stats; 184 struct fcoe_dev_stats *stats;
185 struct fc_frame_header *fh; 185 struct fc_frame_header *fh;
186 unsigned short oxid;
187 int cpu_idx;
188 struct fcoe_percpu_s *fps; 186 struct fcoe_percpu_s *fps;
187 unsigned short oxid;
188 unsigned int cpu_idx;
189 189
190 fc = container_of(ptype, struct fcoe_softc, fcoe_packet_type); 190 fc = container_of(ptype, struct fcoe_softc, fcoe_packet_type);
191 lp = fc->lp; 191 lp = fc->lp;
@@ -292,7 +292,7 @@ static int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen)
292{ 292{
293 struct fcoe_percpu_s *fps; 293 struct fcoe_percpu_s *fps;
294 struct page *page; 294 struct page *page;
295 int cpu_idx; 295 unsigned int cpu_idx;
296 296
297 cpu_idx = get_cpu(); 297 cpu_idx = get_cpu();
298 fps = fcoe_percpu[cpu_idx]; 298 fps = fcoe_percpu[cpu_idx];
@@ -1366,10 +1366,9 @@ EXPORT_SYMBOL_GPL(fcoe_libfc_config);
1366 */ 1366 */
1367static int __init fcoe_init(void) 1367static int __init fcoe_init(void)
1368{ 1368{
1369 int cpu; 1369 unsigned int cpu;
1370 struct fcoe_percpu_s *p; 1370 struct fcoe_percpu_s *p;
1371 1371
1372
1373 INIT_LIST_HEAD(&fcoe_hostlist); 1372 INIT_LIST_HEAD(&fcoe_hostlist);
1374 rwlock_init(&fcoe_hostlist_lock); 1373 rwlock_init(&fcoe_hostlist_lock);
1375 1374
@@ -1377,6 +1376,12 @@ static int __init fcoe_init(void)
1377 register_cpu_notifier(&fcoe_cpu_notifier); 1376 register_cpu_notifier(&fcoe_cpu_notifier);
1378#endif /* CONFIG_HOTPLUG_CPU */ 1377#endif /* CONFIG_HOTPLUG_CPU */
1379 1378
1379 for_each_possible_cpu(cpu) {
1380 p = fcoe_percpu[cpu];
1381 p->cpu = cpu;
1382 skb_queue_head_init(&p->fcoe_rx_list);
1383 }
1384
1380 /* 1385 /*
1381 * initialize per CPU interrupt thread 1386 * initialize per CPU interrupt thread
1382 */ 1387 */
@@ -1392,9 +1397,7 @@ static int __init fcoe_init(void)
1392 * initialize the semaphore and skb queue head 1397 * initialize the semaphore and skb queue head
1393 */ 1398 */
1394 if (likely(!IS_ERR(p->thread))) { 1399 if (likely(!IS_ERR(p->thread))) {
1395 p->cpu = cpu;
1396 fcoe_percpu[cpu] = p; 1400 fcoe_percpu[cpu] = p;
1397 skb_queue_head_init(&p->fcoe_rx_list);
1398 kthread_bind(p->thread, cpu); 1401 kthread_bind(p->thread, cpu);
1399 wake_up_process(p->thread); 1402 wake_up_process(p->thread);
1400 } else { 1403 } else {
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index c41f7d0c6efc..124dc5bd9f87 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -29,7 +29,7 @@
29 * this percpu struct for fcoe 29 * this percpu struct for fcoe
30 */ 30 */
31struct fcoe_percpu_s { 31struct fcoe_percpu_s {
32 int cpu; 32 unsigned int cpu;
33 struct task_struct *thread; 33 struct task_struct *thread;
34 struct sk_buff_head fcoe_rx_list; 34 struct sk_buff_head fcoe_rx_list;
35 struct page *crc_eof_page; 35 struct page *crc_eof_page;