.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Serial Attached SCSI (SAS) class internal header file |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2005 Adaptec, Inc. All rights reserved. |
---|
5 | 6 | * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> |
---|
6 | | - * |
---|
7 | | - * This file is licensed under GPLv2. |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or |
---|
10 | | - * modify it under the terms of the GNU General Public License as |
---|
11 | | - * published by the Free Software Foundation; either version 2 of the |
---|
12 | | - * License, or (at your option) any later version. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, but |
---|
15 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | | - * General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU General Public License |
---|
20 | | - * along with this program; if not, write to the Free Software |
---|
21 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
22 | | - * USA |
---|
23 | | - * |
---|
24 | 7 | */ |
---|
25 | 8 | |
---|
26 | 9 | #ifndef _SAS_INTERNAL_H_ |
---|
.. | .. |
---|
32 | 15 | #include <scsi/libsas.h> |
---|
33 | 16 | #include <scsi/sas_ata.h> |
---|
34 | 17 | |
---|
35 | | -#define sas_printk(fmt, ...) printk(KERN_NOTICE "sas: " fmt, ## __VA_ARGS__) |
---|
| 18 | +#ifdef pr_fmt |
---|
| 19 | +#undef pr_fmt |
---|
| 20 | +#endif |
---|
36 | 21 | |
---|
37 | | -#define SAS_DPRINTK(fmt, ...) printk(KERN_DEBUG "sas: " fmt, ## __VA_ARGS__) |
---|
| 22 | +#define SAS_FMT "sas: " |
---|
| 23 | + |
---|
| 24 | +#define pr_fmt(fmt) SAS_FMT fmt |
---|
38 | 25 | |
---|
39 | 26 | #define TO_SAS_TASK(_scsi_cmd) ((void *)(_scsi_cmd)->host_scribble) |
---|
40 | 27 | #define ASSIGN_SAS_TASK(_sc, _t) do { (_sc)->host_scribble = (void *) _t; } while (0) |
---|
.. | .. |
---|
62 | 49 | void sas_unregister_phys(struct sas_ha_struct *sas_ha); |
---|
63 | 50 | |
---|
64 | 51 | struct asd_sas_event *sas_alloc_event(struct asd_sas_phy *phy); |
---|
| 52 | +struct asd_sas_event *sas_alloc_event_gfp(struct asd_sas_phy *phy, |
---|
| 53 | + gfp_t gfp_flags); |
---|
65 | 54 | void sas_free_event(struct asd_sas_event *event); |
---|
66 | 55 | |
---|
67 | 56 | int sas_register_ports(struct sas_ha_struct *sas_ha); |
---|
68 | 57 | void sas_unregister_ports(struct sas_ha_struct *sas_ha); |
---|
69 | 58 | |
---|
70 | | -int sas_init_events(struct sas_ha_struct *sas_ha); |
---|
71 | 59 | void sas_disable_revalidation(struct sas_ha_struct *ha); |
---|
72 | 60 | void sas_enable_revalidation(struct sas_ha_struct *ha); |
---|
73 | 61 | void __sas_drain_work(struct sas_ha_struct *ha); |
---|
.. | .. |
---|
91 | 79 | int sas_smp_get_phy_events(struct sas_phy *phy); |
---|
92 | 80 | |
---|
93 | 81 | int sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event); |
---|
| 82 | +int sas_notify_phy_event_gfp(struct asd_sas_phy *phy, enum phy_event event, |
---|
| 83 | + gfp_t flags); |
---|
94 | 84 | void sas_device_set_phy(struct domain_device *dev, struct sas_port *port); |
---|
95 | 85 | struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy); |
---|
96 | 86 | struct domain_device *sas_ex_to_ata(struct domain_device *ex_dev, int phy_id); |
---|
.. | .. |
---|
120 | 110 | |
---|
121 | 111 | static inline void sas_fail_probe(struct domain_device *dev, const char *func, int err) |
---|
122 | 112 | { |
---|
123 | | - SAS_DPRINTK("%s: for %s device %16llx returned %d\n", |
---|
124 | | - func, dev->parent ? "exp-attached" : |
---|
125 | | - "direct-attached", |
---|
126 | | - SAS_ADDR(dev->sas_addr), err); |
---|
| 113 | + pr_warn("%s: for %s device %016llx returned %d\n", |
---|
| 114 | + func, dev->parent ? "exp-attached" : |
---|
| 115 | + "direct-attached", |
---|
| 116 | + SAS_ADDR(dev->sas_addr), err); |
---|
127 | 117 | sas_unregister_dev(dev->port, dev); |
---|
128 | 118 | } |
---|
129 | 119 | |
---|