@@ -61,7 +61,7 @@ u8 pciehp_handle_attention_button(struct slot *p_slot)
61
61
struct controller * ctrl = p_slot -> ctrl ;
62
62
63
63
/* Attention Button Change */
64
- ctrl_dbg (ctrl , "Attention button interrupt received. \n" );
64
+ ctrl_dbg (ctrl , "Attention button interrupt received\n" );
65
65
66
66
/*
67
67
* Button pressed - See if need to TAKE ACTION!!!
@@ -81,7 +81,7 @@ u8 pciehp_handle_switch_change(struct slot *p_slot)
81
81
struct controller * ctrl = p_slot -> ctrl ;
82
82
83
83
/* Switch Change */
84
- ctrl_dbg (ctrl , "Switch interrupt received. \n" );
84
+ ctrl_dbg (ctrl , "Switch interrupt received\n" );
85
85
86
86
p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
87
87
if (getstatus ) {
@@ -110,7 +110,7 @@ u8 pciehp_handle_presence_change(struct slot *p_slot)
110
110
struct controller * ctrl = p_slot -> ctrl ;
111
111
112
112
/* Presence Change */
113
- ctrl_dbg (ctrl , "Presence/Notify input change. \n" );
113
+ ctrl_dbg (ctrl , "Presence/Notify input change\n" );
114
114
115
115
/* Switch is open, assume a presence change
116
116
* Save the presence state
@@ -142,7 +142,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
142
142
struct controller * ctrl = p_slot -> ctrl ;
143
143
144
144
/* power fault */
145
- ctrl_dbg (ctrl , "Power fault interrupt received. \n" );
145
+ ctrl_dbg (ctrl , "Power fault interrupt received\n" );
146
146
147
147
if ( !(p_slot -> hpc_ops -> query_power_fault (p_slot ))) {
148
148
/*
@@ -157,7 +157,7 @@ u8 pciehp_handle_power_fault(struct slot *p_slot)
157
157
*/
158
158
ctrl_info (ctrl , "Power fault on Slot(%s)\n" , slot_name (p_slot ));
159
159
event_type = INT_POWER_FAULT ;
160
- ctrl_info (ctrl , "power fault bit %x set\n" , 0 );
160
+ ctrl_info (ctrl , "Power fault bit %x set\n" , 0 );
161
161
}
162
162
163
163
queue_interrupt_event (p_slot , event_type );
@@ -175,8 +175,7 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
175
175
if (POWER_CTRL (ctrl )) {
176
176
if (pslot -> hpc_ops -> power_off_slot (pslot )) {
177
177
ctrl_err (ctrl ,
178
- "%s: Issue of Slot Power Off command failed\n" ,
179
- __func__ );
178
+ "Issue of Slot Power Off command failed\n" );
180
179
return ;
181
180
}
182
181
}
@@ -193,8 +192,8 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
193
192
194
193
if (ATTN_LED (ctrl )) {
195
194
if (pslot -> hpc_ops -> set_attention_status (pslot , 1 )) {
196
- ctrl_err (ctrl , "%s: Issue of Set Attention "
197
- "Led command failed\n" , __func__ );
195
+ ctrl_err (ctrl ,
196
+ "Issue of Set Attention Led command failed\n" );
198
197
return ;
199
198
}
200
199
}
@@ -211,8 +210,9 @@ static int board_added(struct slot *p_slot)
211
210
{
212
211
int retval = 0 ;
213
212
struct controller * ctrl = p_slot -> ctrl ;
213
+ struct pci_bus * parent = ctrl -> pci_dev -> subordinate ;
214
214
215
- ctrl_dbg (ctrl , "%s: slot device, slot offset, hp slot = %d, %d , %d\n" ,
215
+ ctrl_dbg (ctrl , "%s: slot device, slot offset, hp slot = %d, %d, %d\n" ,
216
216
__func__ , p_slot -> device , ctrl -> slot_device_offset ,
217
217
p_slot -> hp_slot );
218
218
@@ -229,22 +229,22 @@ static int board_added(struct slot *p_slot)
229
229
/* Check link training status */
230
230
retval = p_slot -> hpc_ops -> check_lnk_status (ctrl );
231
231
if (retval ) {
232
- ctrl_err (ctrl , "%s: Failed to check link status\n" , __func__ );
232
+ ctrl_err (ctrl , "Failed to check link status\n" );
233
233
set_slot_off (ctrl , p_slot );
234
234
return retval ;
235
235
}
236
236
237
237
/* Check for a power fault */
238
238
if (p_slot -> hpc_ops -> query_power_fault (p_slot )) {
239
- ctrl_dbg (ctrl , "%s: power fault detected\n" , __func__ );
239
+ ctrl_dbg (ctrl , "Power fault detected\n" );
240
240
retval = POWER_FAILURE ;
241
241
goto err_exit ;
242
242
}
243
243
244
244
retval = pciehp_configure_device (p_slot );
245
245
if (retval ) {
246
- ctrl_err (ctrl , "Cannot add device 0x%x:%x \n" ,
247
- p_slot -> bus , p_slot -> device );
246
+ ctrl_err (ctrl , "Cannot add device at %04x:%02x:%02x \n" ,
247
+ pci_domain_nr ( parent ), p_slot -> bus , p_slot -> device );
248
248
goto err_exit ;
249
249
}
250
250
@@ -276,14 +276,14 @@ static int remove_board(struct slot *p_slot)
276
276
if (retval )
277
277
return retval ;
278
278
279
- ctrl_dbg (ctrl , "In %s, hp_slot = %d\n" , __func__ , p_slot -> hp_slot );
279
+ ctrl_dbg (ctrl , "%s: hp_slot = %d\n" , __func__ , p_slot -> hp_slot );
280
280
281
281
if (POWER_CTRL (ctrl )) {
282
282
/* power off slot */
283
283
retval = p_slot -> hpc_ops -> power_off_slot (p_slot );
284
284
if (retval ) {
285
- ctrl_err (ctrl , "%s: Issue of Slot Disable command "
286
- "failed\n" , __func__ );
285
+ ctrl_err (ctrl ,
286
+ "Issue of Slot Disable command failed\n" );
287
287
return retval ;
288
288
}
289
289
}
@@ -324,8 +324,10 @@ static void pciehp_power_thread(struct work_struct *work)
324
324
switch (p_slot -> state ) {
325
325
case POWEROFF_STATE :
326
326
mutex_unlock (& p_slot -> lock );
327
- ctrl_dbg (p_slot -> ctrl , "%s: disabling bus:device(%x:%x)\n" ,
328
- __func__ , p_slot -> bus , p_slot -> device );
327
+ ctrl_dbg (p_slot -> ctrl ,
328
+ "Disabling domain:bus:device=%04x:%02x:%02x\n" ,
329
+ pci_domain_nr (p_slot -> ctrl -> pci_dev -> subordinate ),
330
+ p_slot -> bus , p_slot -> device );
329
331
pciehp_disable_slot (p_slot );
330
332
mutex_lock (& p_slot -> lock );
331
333
p_slot -> state = STATIC_STATE ;
@@ -433,7 +435,6 @@ static void handle_button_press_event(struct slot *p_slot)
433
435
* expires to cancel hot-add or hot-remove
434
436
*/
435
437
ctrl_info (ctrl , "Button cancel on Slot(%s)\n" , slot_name (p_slot ));
436
- ctrl_dbg (ctrl , "%s: button cancel\n" , __func__ );
437
438
cancel_delayed_work (& p_slot -> work );
438
439
if (p_slot -> state == BLINKINGOFF_STATE ) {
439
440
if (PWR_LED (ctrl ))
@@ -537,16 +538,15 @@ int pciehp_enable_slot(struct slot *p_slot)
537
538
538
539
rc = p_slot -> hpc_ops -> get_adapter_status (p_slot , & getstatus );
539
540
if (rc || !getstatus ) {
540
- ctrl_info (ctrl , "%s: no adapter on slot(%s)\n" ,
541
- __func__ , slot_name (p_slot ));
541
+ ctrl_info (ctrl , "No adapter on slot(%s)\n" , slot_name (p_slot ));
542
542
mutex_unlock (& p_slot -> ctrl -> crit_sect );
543
543
return - ENODEV ;
544
544
}
545
545
if (MRL_SENS (p_slot -> ctrl )) {
546
546
rc = p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
547
547
if (rc || getstatus ) {
548
- ctrl_info (ctrl , "%s: latch open on slot(%s)\n" ,
549
- __func__ , slot_name (p_slot ));
548
+ ctrl_info (ctrl , "Latch open on slot(%s)\n" ,
549
+ slot_name (p_slot ));
550
550
mutex_unlock (& p_slot -> ctrl -> crit_sect );
551
551
return - ENODEV ;
552
552
}
@@ -555,8 +555,8 @@ int pciehp_enable_slot(struct slot *p_slot)
555
555
if (POWER_CTRL (p_slot -> ctrl )) {
556
556
rc = p_slot -> hpc_ops -> get_power_status (p_slot , & getstatus );
557
557
if (rc || getstatus ) {
558
- ctrl_info (ctrl , "%s: already enabled on slot(%s)\n" ,
559
- __func__ , slot_name (p_slot ));
558
+ ctrl_info (ctrl , "Already enabled on slot(%s)\n" ,
559
+ slot_name (p_slot ));
560
560
mutex_unlock (& p_slot -> ctrl -> crit_sect );
561
561
return - EINVAL ;
562
562
}
@@ -591,8 +591,8 @@ int pciehp_disable_slot(struct slot *p_slot)
591
591
if (!HP_SUPR_RM (p_slot -> ctrl )) {
592
592
ret = p_slot -> hpc_ops -> get_adapter_status (p_slot , & getstatus );
593
593
if (ret || !getstatus ) {
594
- ctrl_info (ctrl , "%s: no adapter on slot(%s)\n" ,
595
- __func__ , slot_name (p_slot ));
594
+ ctrl_info (ctrl , "No adapter on slot(%s)\n" ,
595
+ slot_name (p_slot ));
596
596
mutex_unlock (& p_slot -> ctrl -> crit_sect );
597
597
return - ENODEV ;
598
598
}
@@ -601,8 +601,8 @@ int pciehp_disable_slot(struct slot *p_slot)
601
601
if (MRL_SENS (p_slot -> ctrl )) {
602
602
ret = p_slot -> hpc_ops -> get_latch_status (p_slot , & getstatus );
603
603
if (ret || getstatus ) {
604
- ctrl_info (ctrl , "%s: latch open on slot(%s)\n" ,
605
- __func__ , slot_name (p_slot ));
604
+ ctrl_info (ctrl , "Latch open on slot(%s)\n" ,
605
+ slot_name (p_slot ));
606
606
mutex_unlock (& p_slot -> ctrl -> crit_sect );
607
607
return - ENODEV ;
608
608
}
@@ -611,8 +611,8 @@ int pciehp_disable_slot(struct slot *p_slot)
611
611
if (POWER_CTRL (p_slot -> ctrl )) {
612
612
ret = p_slot -> hpc_ops -> get_power_status (p_slot , & getstatus );
613
613
if (ret || !getstatus ) {
614
- ctrl_info (ctrl , "%s: already disabled slot(%s)\n" ,
615
- __func__ , slot_name (p_slot ));
614
+ ctrl_info (ctrl , "Already disabled on slot(%s)\n" ,
615
+ slot_name (p_slot ));
616
616
mutex_unlock (& p_slot -> ctrl -> crit_sect );
617
617
return - EINVAL ;
618
618
}
0 commit comments