@@ -62,7 +62,7 @@ u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl)
62
62
u32 event_type ;
63
63
64
64
/* Attention Button Change */
65
- ctrl_dbg (ctrl , "Attention button interrupt received. \n" );
65
+ ctrl_dbg (ctrl , "Attention button interrupt received\n" );
66
66
67
67
p_slot = shpchp_find_slot (ctrl , hp_slot + ctrl -> slot_device_offset );
68
68
p_slot -> hpc_ops -> get_adapter_status (p_slot , & (p_slot -> presence_save ));
@@ -86,13 +86,13 @@ u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl)
86
86
u32 event_type ;
87
87
88
88
/* Switch Change */
89
- ctrl_dbg (ctrl , "Switch interrupt received. \n" );
89
+ ctrl_dbg (ctrl , "Switch interrupt received\n" );
90
90
91
91
p_slot = shpchp_find_slot (ctrl , hp_slot + ctrl -> slot_device_offset );
92
92
p_slot -> hpc_ops -> get_adapter_status (p_slot , & (p_slot -> presence_save ));
93
93
p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
94
- ctrl_dbg (ctrl , "%s: Card present %x Power status %x\n" ,
95
- __func__ , p_slot -> presence_save , p_slot -> pwr_save );
94
+ ctrl_dbg (ctrl , "Card present %x Power status %x\n" ,
95
+ p_slot -> presence_save , p_slot -> pwr_save );
96
96
97
97
if (getstatus ) {
98
98
/*
@@ -123,7 +123,7 @@ u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl)
123
123
u32 event_type ;
124
124
125
125
/* Presence Change */
126
- ctrl_dbg (ctrl , "Presence/Notify input change. \n" );
126
+ ctrl_dbg (ctrl , "Presence/Notify input change\n" );
127
127
128
128
p_slot = shpchp_find_slot (ctrl , hp_slot + ctrl -> slot_device_offset );
129
129
@@ -158,7 +158,7 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
158
158
u32 event_type ;
159
159
160
160
/* Power fault */
161
- ctrl_dbg (ctrl , "Power fault interrupt received. \n" );
161
+ ctrl_dbg (ctrl , "Power fault interrupt received\n" );
162
162
163
163
p_slot = shpchp_find_slot (ctrl , hp_slot + ctrl -> slot_device_offset );
164
164
@@ -178,7 +178,7 @@ u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
178
178
event_type = INT_POWER_FAULT ;
179
179
/* set power fault status for this board */
180
180
p_slot -> status = 0xFF ;
181
- ctrl_info (ctrl , "power fault bit %x set\n" , hp_slot );
181
+ ctrl_info (ctrl , "Power fault bit %x set\n" , hp_slot );
182
182
}
183
183
184
184
queue_interrupt_event (p_slot , event_type );
@@ -194,7 +194,7 @@ static int change_bus_speed(struct controller *ctrl, struct slot *p_slot,
194
194
{
195
195
int rc = 0 ;
196
196
197
- ctrl_dbg (ctrl , "%s: change to speed %d\n" , __func__ , speed );
197
+ ctrl_dbg (ctrl , "Change speed to %d\n" , speed );
198
198
if ((rc = p_slot -> hpc_ops -> set_bus_speed_mode (p_slot , speed ))) {
199
199
ctrl_err (ctrl , "%s: Issue of set bus speed mode command "
200
200
"failed\n" , __func__ );
@@ -215,8 +215,8 @@ static int fix_bus_speed(struct controller *ctrl, struct slot *pslot,
215
215
*/
216
216
if (flag ) {
217
217
if (asp < bsp ) {
218
- ctrl_err (ctrl , "%s: speed of bus %x and adapter %x "
219
- "mismatch\n" , __func__ , bsp , asp );
218
+ ctrl_err (ctrl , "Speed of bus %x and adapter %x "
219
+ "mismatch\n" , bsp , asp );
220
220
rc = WRONG_BUS_FREQUENCY ;
221
221
}
222
222
return rc ;
@@ -246,6 +246,7 @@ static int board_added(struct slot *p_slot)
246
246
int rc = 0 ;
247
247
enum pci_bus_speed asp , bsp , msp ;
248
248
struct controller * ctrl = p_slot -> ctrl ;
249
+ struct pci_bus * parent = ctrl -> pci_dev -> subordinate ;
249
250
250
251
hp_slot = p_slot -> device - ctrl -> slot_device_offset ;
251
252
@@ -256,7 +257,7 @@ static int board_added(struct slot *p_slot)
256
257
/* Power on slot without connecting to bus */
257
258
rc = p_slot -> hpc_ops -> power_on_slot (p_slot );
258
259
if (rc ) {
259
- ctrl_err (ctrl , "%s: Failed to power on slot\n" , __func__ );
260
+ ctrl_err (ctrl , "Failed to power on slot\n" );
260
261
return -1 ;
261
262
}
262
263
@@ -272,29 +273,27 @@ static int board_added(struct slot *p_slot)
272
273
273
274
/* turn on board, blink green LED, turn off Amber LED */
274
275
if ((rc = p_slot -> hpc_ops -> slot_enable (p_slot ))) {
275
- ctrl_err (ctrl , "%s: Issue of Slot Enable command"
276
- " failed\n" , __func__ );
276
+ ctrl_err (ctrl , "Issue of Slot Enable command failed\n" );
277
277
return rc ;
278
278
}
279
279
}
280
280
281
281
rc = p_slot -> hpc_ops -> get_adapter_speed (p_slot , & asp );
282
282
if (rc ) {
283
- ctrl_err (ctrl , "%s: Can't get adapter speed or bus mode "
284
- "mismatch\n" , __func__ );
283
+ ctrl_err (ctrl , "Can't get adapter speed or "
284
+ "bus mode mismatch\n" );
285
285
return WRONG_BUS_FREQUENCY ;
286
286
}
287
287
288
288
rc = p_slot -> hpc_ops -> get_cur_bus_speed (p_slot , & bsp );
289
289
if (rc ) {
290
- ctrl_err (ctrl , "%s: Can't get bus operation speed\n" , __func__ );
290
+ ctrl_err (ctrl , "Can't get bus operation speed\n" );
291
291
return WRONG_BUS_FREQUENCY ;
292
292
}
293
293
294
294
rc = p_slot -> hpc_ops -> get_max_bus_speed (p_slot , & msp );
295
295
if (rc ) {
296
- ctrl_err (ctrl , "%s: Can't get max bus operation speed\n" ,
297
- __func__ );
296
+ ctrl_err (ctrl , "Can't get max bus operation speed\n" );
298
297
msp = bsp ;
299
298
}
300
299
@@ -312,8 +311,7 @@ static int board_added(struct slot *p_slot)
312
311
313
312
/* turn on board, blink green LED, turn off Amber LED */
314
313
if ((rc = p_slot -> hpc_ops -> slot_enable (p_slot ))) {
315
- ctrl_err (ctrl , "%s: Issue of Slot Enable command failed\n" ,
316
- __func__ );
314
+ ctrl_err (ctrl , "Issue of Slot Enable command failed\n" );
317
315
return rc ;
318
316
}
319
317
@@ -324,15 +322,15 @@ static int board_added(struct slot *p_slot)
324
322
/* Check for a power fault */
325
323
if (p_slot -> status == 0xFF ) {
326
324
/* power fault occurred, but it was benign */
327
- ctrl_dbg (ctrl , "%s: power fault\n" , __func__ );
325
+ ctrl_dbg (ctrl , "%s: Power fault\n" , __func__ );
328
326
rc = POWER_FAILURE ;
329
327
p_slot -> status = 0 ;
330
328
goto err_exit ;
331
329
}
332
330
333
331
if (shpchp_configure_device (p_slot )) {
334
- ctrl_err (ctrl , "Cannot add device at 0x%x:0x%x \n" ,
335
- p_slot -> bus , p_slot -> device );
332
+ ctrl_err (ctrl , "Cannot add device at %04x:%02x:%02x \n" ,
333
+ pci_domain_nr ( parent ), p_slot -> bus , p_slot -> device );
336
334
goto err_exit ;
337
335
}
338
336
@@ -373,7 +371,7 @@ static int remove_board(struct slot *p_slot)
373
371
hp_slot = p_slot -> device - ctrl -> slot_device_offset ;
374
372
p_slot = shpchp_find_slot (ctrl , hp_slot + ctrl -> slot_device_offset );
375
373
376
- ctrl_dbg (ctrl , "In %s, hp_slot = %d\n" , __func__ , hp_slot );
374
+ ctrl_dbg (ctrl , "%s: hp_slot = %d\n" , __func__ , hp_slot );
377
375
378
376
/* Change status to shutdown */
379
377
if (p_slot -> is_a_board )
@@ -389,8 +387,7 @@ static int remove_board(struct slot *p_slot)
389
387
390
388
rc = p_slot -> hpc_ops -> set_attention_status (p_slot , 0 );
391
389
if (rc ) {
392
- ctrl_err (ctrl , "%s: Issue of Set Attention command failed\n" ,
393
- __func__ );
390
+ ctrl_err (ctrl , "Issue of Set Attention command failed\n" );
394
391
return rc ;
395
392
}
396
393
@@ -526,7 +523,6 @@ static void handle_button_press_event(struct slot *p_slot)
526
523
*/
527
524
ctrl_info (ctrl , "Button cancel on Slot(%s)\n" ,
528
525
slot_name (p_slot ));
529
- ctrl_dbg (ctrl , "%s: button cancel\n" , __func__ );
530
526
cancel_delayed_work (& p_slot -> work );
531
527
if (p_slot -> state == BLINKINGOFF_STATE )
532
528
p_slot -> hpc_ops -> green_led_on (p_slot );
@@ -565,7 +561,7 @@ static void interrupt_event_handler(struct work_struct *work)
565
561
handle_button_press_event (p_slot );
566
562
break ;
567
563
case INT_POWER_FAULT :
568
- ctrl_dbg (p_slot -> ctrl , "%s: power fault\n" , __func__ );
564
+ ctrl_dbg (p_slot -> ctrl , "%s: Power fault\n" , __func__ );
569
565
p_slot -> hpc_ops -> set_attention_status (p_slot , 1 );
570
566
p_slot -> hpc_ops -> green_led_off (p_slot );
571
567
break ;
@@ -660,7 +656,7 @@ static int shpchp_disable_slot (struct slot *p_slot)
660
656
}
661
657
rc = p_slot -> hpc_ops -> get_power_status (p_slot , & getstatus );
662
658
if (rc || !getstatus ) {
663
- ctrl_info (ctrl , "Already disabled slot(%s)\n" ,
659
+ ctrl_info (ctrl , "Already disabled on slot(%s)\n" ,
664
660
slot_name (p_slot ));
665
661
goto out ;
666
662
}
0 commit comments