Hi, [auto build test ERROR on tj-libata/for-next] [also build test ERROR on v4.7-rc3 next-20160615] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/DingXiang/libata-fix-kernel-panic-when-hotplug/20160615-154255 base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/libata for-next config: tile-allyesconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All error/warnings (new ones prefixed by >>): drivers/ata/libata-eh.c: In function 'ata_scsi_port_error_handler': >> drivers/ata/libata-eh.c:836:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] >> drivers/ata/libata-eh.c:836:1: warning: '__used__' attribute ignored [-Wattributes] >> drivers/ata/libata-eh.c:836:1: error: section attribute cannot be specified for local variables >> drivers/ata/libata-eh.c:836:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes] >> drivers/ata/libata-eh.c:836:1: error: declaration of '__ksymtab_ata_scsi_port_error_handler' with no linkage follows extern declaration drivers/ata/libata-eh.c:836:1: note: previous declaration of '__ksymtab_ata_scsi_port_error_handler' was here drivers/ata/libata-eh.c:871:1: error: non-static declaration of 'ata_port_wait_eh' follows static declaration drivers/ata/libata-eh.c:847:6: note: previous definition of 'ata_port_wait_eh' was here drivers/ata/libata-eh.c:871:1: warning: '__used__' attribute ignored [-Wattributes] drivers/ata/libata-eh.c:871:1: error: section attribute cannot be specified for local variables drivers/ata/libata-eh.c:871:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes] >> drivers/ata/libata-eh.c:871:1: error: declaration of '__ksymtab_ata_port_wait_eh' with no linkage follows extern declaration drivers/ata/libata-eh.c:871:1: note: previous declaration of '__ksymtab_ata_port_wait_eh' was here drivers/ata/libata-eh.c:873:12: error: invalid storage class for function 'ata_eh_nr_in_flight' drivers/ata/libata-eh.c:937:13: error: invalid storage class for function 'ata_eh_set_pending' drivers/ata/libata-eh.c:1012:1: error: non-static declaration of 'ata_std_sched_eh' follows static declaration drivers/ata/libata-eh.c:1000:6: note: previous definition of 'ata_std_sched_eh' was here drivers/ata/libata-eh.c:1012:1: warning: '__used__' attribute ignored [-Wattributes] drivers/ata/libata-eh.c:1012:1: error: section attribute cannot be specified for local variables drivers/ata/libata-eh.c:1012:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes] >> drivers/ata/libata-eh.c:1012:1: error: declaration of '__ksymtab_ata_std_sched_eh' with no linkage follows extern declaration drivers/ata/libata-eh.c:1012:1: note: previous declaration of '__ksymtab_ata_std_sched_eh' was here drivers/ata/libata-eh.c:1032:1: error: non-static declaration of 'ata_std_end_eh' follows static declaration drivers/ata/libata-eh.c:1026:6: note: previous definition of 'ata_std_end_eh' was here drivers/ata/libata-eh.c:1032:1: warning: '__used__' attribute ignored [-Wattributes] drivers/ata/libata-eh.c:1032:1: error: section attribute cannot be specified for local variables drivers/ata/libata-eh.c:1032:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes] >> drivers/ata/libata-eh.c:1032:1: error: declaration of '__ksymtab_ata_std_end_eh' with no linkage follows extern declaration drivers/ata/libata-eh.c:1032:1: note: previous declaration of '__ksymtab_ata_std_end_eh' was here drivers/ata/libata-eh.c:1051:12: error: invalid storage class for function 'ata_do_link_abort' drivers/ata/libata-eh.c:1128:13: error: invalid storage class for function '__ata_port_freeze' drivers/ata/libata-eh.c:1288:13: error: invalid storage class for function 'ata_eh_scsidone' drivers/ata/libata-eh.c:1293:13: error: invalid storage class for function '__ata_eh_qc_complete' drivers/ata/libata-eh.c:1471:20: error: invalid storage class for function 'ata_err_string' drivers/ata/libata-eh.c:1571:12: error: invalid storage class for function 'ata_eh_read_log_10h' drivers/ata/libata-eh.c:1654:13: error: invalid storage class for function 'ata_eh_request_sense' drivers/ata/libata-eh.c:1756:13: error: invalid storage class for function 'ata_eh_analyze_serror' drivers/ata/libata-eh.c:1885:21: error: invalid storage class for function 'ata_eh_analyze_tf' drivers/ata/libata-eh.c:1957:12: error: invalid storage class for function 'ata_eh_categorize_error' drivers/ata/libata-eh.c:1991:12: error: invalid storage class for function 'speed_down_verdict_cb' drivers/ata/libata-eh.c:2063:21: error: invalid storage class for function 'ata_eh_speed_down_verdict' drivers/ata/libata-eh.c:2123:21: error: invalid storage class for function 'ata_eh_speed_down' drivers/ata/libata-eh.c:2208:19: error: invalid storage class for function 'ata_eh_worth_retry' drivers/ata/libata-eh.c:2230:13: error: invalid storage class for function 'ata_eh_link_autopsy' drivers/ata/libata-eh.c:2506:1: error: non-static declaration of 'ata_get_cmd_descript' follows static declaration drivers/ata/libata-eh.c:2396:13: note: previous definition of 'ata_get_cmd_descript' was here drivers/ata/libata-eh.c:2506:1: warning: '__used__' attribute ignored [-Wattributes] drivers/ata/libata-eh.c:2506:1: error: section attribute cannot be specified for local variables drivers/ata/libata-eh.c:2506:1: warning: 'externally_visible' attribute have effect only on public objects [-Wattributes] >> drivers/ata/libata-eh.c:2506:1: error: declaration of '__ksymtab_ata_get_cmd_descript' with no linkage follows extern declaration drivers/ata/libata-eh.c:2506:1: note: previous declaration of '__ksymtab_ata_get_cmd_descript' was here drivers/ata/libata-eh.c:2517:13: error: invalid storage class for function 'ata_eh_link_report' drivers/ata/libata-eh.c:2703:12: error: invalid storage class for function 'ata_do_reset' drivers/ata/libata-eh.c:2716:12: error: invalid storage class for function 'ata_eh_followup_srst_needed' drivers/ata/libata-eh.c:3117:20: error: invalid storage class for function 'ata_eh_pull_park_action' drivers/ata/libata-eh.c:3163:13: error: invalid storage class for function 'ata_eh_park_issue_cmd' drivers/ata/libata-eh.c:3191:12: error: invalid storage class for function 'ata_eh_revalidate_and_attach' drivers/ata/libata-eh.c:3386:12: error: invalid storage class for function 'atapi_eh_clear_ua' drivers/ata/libata-eh.c:3437:12: error: invalid storage class for function 'ata_eh_maybe_retry_flush' drivers/ata/libata-eh.c:3513:12: error: invalid storage class for function 'ata_eh_set_lpm' drivers/ata/libata-eh.c:3639:12: error: invalid storage class for function 'ata_link_nr_vacant' drivers/ata/libata-eh.c:3650:12: error: invalid storage class for function 'ata_eh_skip_recovery' drivers/ata/libata-eh.c:3683:12: error: invalid storage class for function 'ata_count_probe_trials_cb' drivers/ata/libata-eh.c:3697:12: error: invalid storage class for function 'ata_eh_schedule_probe' drivers/ata/libata-eh.c:3746:12: error: invalid storage class for function 'ata_eh_handle_dev_fail' drivers/ata/libata-eh.c:4140:1: error: expected declaration or statement at end of input drivers/ata/libata-eh.c: At top level: drivers/ata/libata-eh.c:166:13: warning: '__ata_port_freeze' used but never defined [enabled by default] vim +836 drivers/ata/libata-eh.c c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 830 /* tell wait_eh that we're done */ b51e9e5db drivers/scsi/libata-eh.c Tejun Heo 2006-06-29 831 ap->pflags &= ~ATA_PFLAG_EH_IN_PROGRESS; c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 832 wake_up_all(&ap->eh_wait_q); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 833 e30349d27 drivers/scsi/libata-eh.c Tejun Heo 2006-07-03 834 spin_unlock_irqrestore(ap->lock, flags); ece1d6361 drivers/scsi/libata-eh.c Tejun Heo 2006-04-02 835 } 0e0b494ca drivers/ata/libata-eh.c James Bottomley 2011-01-23 @836 EXPORT_SYMBOL_GPL(ata_scsi_port_error_handler); ece1d6361 drivers/scsi/libata-eh.c Tejun Heo 2006-04-02 837 ece1d6361 drivers/scsi/libata-eh.c Tejun Heo 2006-04-02 838 /** c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 839 * ata_port_wait_eh - Wait for the currently pending EH to complete c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 840 * @ap: Port to wait EH for c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 841 * c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 842 * Wait until the currently pending EH is complete. c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 843 * c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 844 * LOCKING: c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 845 * Kernel thread context (may sleep). c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 846 */ c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 847 void ata_port_wait_eh(struct ata_port *ap) c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 848 { c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 849 unsigned long flags; c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 850 DEFINE_WAIT(wait); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 851 c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 852 retry: ba6a13083 drivers/scsi/libata-eh.c Jeff Garzik 2006-06-22 853 spin_lock_irqsave(ap->lock, flags); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 854 b51e9e5db drivers/scsi/libata-eh.c Tejun Heo 2006-06-29 855 while (ap->pflags & (ATA_PFLAG_EH_PENDING | ATA_PFLAG_EH_IN_PROGRESS)) { c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 856 prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE); ba6a13083 drivers/scsi/libata-eh.c Jeff Garzik 2006-06-22 857 spin_unlock_irqrestore(ap->lock, flags); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 858 schedule(); ba6a13083 drivers/scsi/libata-eh.c Jeff Garzik 2006-06-22 859 spin_lock_irqsave(ap->lock, flags); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 860 } 0a1b622ef drivers/scsi/libata-eh.c Tejun Heo 2006-06-11 861 finish_wait(&ap->eh_wait_q, &wait); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 862 ba6a13083 drivers/scsi/libata-eh.c Jeff Garzik 2006-06-22 863 spin_unlock_irqrestore(ap->lock, flags); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 864 c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 865 /* make sure SCSI EH is complete */ cca3974e4 drivers/ata/libata-eh.c Jeff Garzik 2006-08-24 866 if (scsi_host_in_recovery(ap->scsi_host)) { 97750cebb drivers/ata/libata-eh.c Tejun Heo 2010-09-06 867 ata_msleep(ap, 10); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 868 goto retry; c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 869 } c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 870 } 81c757bc6 drivers/ata/libata-eh.c Dan Williams 2011-12-02 @871 EXPORT_SYMBOL_GPL(ata_port_wait_eh); c6cf9e99d drivers/scsi/libata-eh.c Tejun Heo 2006-05-31 872 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 873 static int ata_eh_nr_in_flight(struct ata_port *ap) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 874 { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 875 unsigned int tag; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 876 int nr = 0; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 877 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 878 /* count only non-internal commands */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 879 for (tag = 0; tag < ATA_MAX_QUEUE - 1; tag++) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 880 if (ata_qc_from_tag(ap, tag)) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 881 nr++; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 882 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 883 return nr; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 884 } 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 885 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 886 void ata_eh_fastdrain_timerfn(unsigned long arg) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 887 { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 888 struct ata_port *ap = (void *)arg; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 889 unsigned long flags; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 890 int cnt; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 891 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 892 spin_lock_irqsave(ap->lock, flags); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 893 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 894 cnt = ata_eh_nr_in_flight(ap); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 895 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 896 /* are we done? */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 897 if (!cnt) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 898 goto out_unlock; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 899 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 900 if (cnt == ap->fastdrain_cnt) { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 901 unsigned int tag; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 902 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 903 /* No progress during the last interval, tag all 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 904 * in-flight qcs as timed out and freeze the port. 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 905 */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 906 for (tag = 0; tag < ATA_MAX_QUEUE - 1; tag++) { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 907 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 908 if (qc) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 909 qc->err_mask |= AC_ERR_TIMEOUT; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 910 } 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 911 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 912 ata_port_freeze(ap); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 913 } else { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 914 /* some qcs have finished, give it another chance */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 915 ap->fastdrain_cnt = cnt; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 916 ap->fastdrain_timer.expires = 341c2c958 drivers/ata/libata-eh.c Tejun Heo 2008-05-20 917 ata_deadline(jiffies, ATA_EH_FASTDRAIN_INTERVAL); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 918 add_timer(&ap->fastdrain_timer); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 919 } 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 920 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 921 out_unlock: 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 922 spin_unlock_irqrestore(ap->lock, flags); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 923 } 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 924 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 925 /** 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 926 * ata_eh_set_pending - set ATA_PFLAG_EH_PENDING and activate fast drain 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 927 * @ap: target ATA port 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 928 * @fastdrain: activate fast drain 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 929 * 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 930 * Set ATA_PFLAG_EH_PENDING and activate fast drain if @fastdrain 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 931 * is non-zero and EH wasn't pending before. Fast drain ensures 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 932 * that EH kicks in in timely manner. 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 933 * 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 934 * LOCKING: 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 935 * spin_lock_irqsave(host lock) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 936 */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 937 static void ata_eh_set_pending(struct ata_port *ap, int fastdrain) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 938 { 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 939 int cnt; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 940 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 941 /* already scheduled? */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 942 if (ap->pflags & ATA_PFLAG_EH_PENDING) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 943 return; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 944 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 945 ap->pflags |= ATA_PFLAG_EH_PENDING; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 946 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 947 if (!fastdrain) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 948 return; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 949 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 950 /* do we have in-flight qcs? */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 951 cnt = ata_eh_nr_in_flight(ap); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 952 if (!cnt) 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 953 return; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 954 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 955 /* activate fast drain */ 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 956 ap->fastdrain_cnt = cnt; 341c2c958 drivers/ata/libata-eh.c Tejun Heo 2008-05-20 957 ap->fastdrain_timer.expires = 341c2c958 drivers/ata/libata-eh.c Tejun Heo 2008-05-20 958 ata_deadline(jiffies, ATA_EH_FASTDRAIN_INTERVAL); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 959 add_timer(&ap->fastdrain_timer); 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 960 } 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 961 f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 962 /** f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 963 * ata_qc_schedule_eh - schedule qc for error handling f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 964 * @qc: command to schedule error handling for f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 965 * f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 966 * Schedule error handling for @qc. EH will kick in as soon as f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 967 * other commands are drained. f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 968 * f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 969 * LOCKING: cca3974e4 drivers/ata/libata-eh.c Jeff Garzik 2006-08-24 970 * spin_lock_irqsave(host lock) f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 971 */ f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 972 void ata_qc_schedule_eh(struct ata_queued_cmd *qc) f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 973 { f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 974 struct ata_port *ap = qc->ap; fa41efdae drivers/ata/libata-eh.c Tejun Heo 2010-04-15 975 struct request_queue *q = qc->scsicmd->device->request_queue; fa41efdae drivers/ata/libata-eh.c Tejun Heo 2010-04-15 976 unsigned long flags; f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 977 f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 978 WARN_ON(!ap->ops->error_handler); f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 979 f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 980 qc->flags |= ATA_QCFLAG_FAILED; 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 981 ata_eh_set_pending(ap, 1); f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 982 f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 983 /* The following will fail if timeout has already expired. f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 984 * ata_scsi_error() takes care of such scmds on EH entry. f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 985 * Note that ATA_QCFLAG_FAILED is unconditionally set after f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 986 * this function completes. f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 987 */ fa41efdae drivers/ata/libata-eh.c Tejun Heo 2010-04-15 988 spin_lock_irqsave(q->queue_lock, flags); 242f9dcb8 drivers/ata/libata-eh.c Jens Axboe 2008-09-14 989 blk_abort_request(qc->scsicmd->request); fa41efdae drivers/ata/libata-eh.c Tejun Heo 2010-04-15 990 spin_unlock_irqrestore(q->queue_lock, flags); f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 991 } f686bcb80 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 992 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 993 /** e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 994 * ata_std_sched_eh - non-libsas ata_ports issue eh with this common routine 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 995 * @ap: ATA port to schedule EH for 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 996 * e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 997 * LOCKING: inherited from ata_port_schedule_eh cca3974e4 drivers/ata/libata-eh.c Jeff Garzik 2006-08-24 998 * spin_lock_irqsave(host lock) 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 999 */ e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1000 void ata_std_sched_eh(struct ata_port *ap) 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1001 { 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1002 WARN_ON(!ap->ops->error_handler); 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1003 f4d6d0046 drivers/ata/libata-eh.c Tejun Heo 2007-05-01 1004 if (ap->pflags & ATA_PFLAG_INITIALIZING) f4d6d0046 drivers/ata/libata-eh.c Tejun Heo 2007-05-01 1005 return; f4d6d0046 drivers/ata/libata-eh.c Tejun Heo 2007-05-01 1006 5ddf24c5e drivers/ata/libata-eh.c Tejun Heo 2007-07-16 1007 ata_eh_set_pending(ap, 1); cca3974e4 drivers/ata/libata-eh.c Jeff Garzik 2006-08-24 1008 scsi_schedule_eh(ap->scsi_host); 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1009 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1010 DPRINTK("port EH scheduled\n"); 7b70fc039 drivers/scsi/libata-eh.c Tejun Heo 2006-05-15 1011 } e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 @1012 EXPORT_SYMBOL_GPL(ata_std_sched_eh); e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1013 e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1014 /** e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1015 * ata_std_end_eh - non-libsas ata_ports complete eh with this common routine e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1016 * @ap: ATA port to end EH for e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1017 * e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1018 * In the libata object model there is a 1:1 mapping of ata_port to e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1019 * shost, so host fields can be directly manipulated under ap->lock, in e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1020 * the libsas case we need to hold a lock at the ha->level to coordinate e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1021 * these events. e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1022 * e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1023 * LOCKING: e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1024 * spin_lock_irqsave(host lock) e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1025 */ e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1026 void ata_std_end_eh(struct ata_port *ap) e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1027 { e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1028 struct Scsi_Host *host = ap->scsi_host; e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1029 e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1030 host->host_eh_scheduled = 0; e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1031 } e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 @1032 EXPORT_SYMBOL(ata_std_end_eh); e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1033 e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1034 e4a9c3732 drivers/ata/libata-eh.c Dan Williams 2012-06-21 1035 /** :::::: The code at line 836 was first introduced by commit :::::: 0e0b494ca8c54a7297d0cc549405091019b3b77e libata: separate error handler into usable components :::::: TO: James Bottomley <James.Bottomley@xxxxxxx> :::::: CC: Jeff Garzik <jgarzik@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data